Saturday, 13 January 2018
Thursday, 11 January 2018
How to bind data in Drop down List from Enum usig Array in Asp.net C#
Add New Class and rename as CommonEnum.
Note:- Set location in App_Code.So it can access any in a project.
Add method
nameSpace Enum
{
Public ClassCommonEnum()
{
}
Public enum Operation
{Insert =1,
Update=2,
Delete=3,
Select=4
}
}
Add New Web Page
Add Asp .Net DropDownList control in .aspx page
<asp:DropDownList Id="ddlOperation" runat= "Server"/>
Add name Space on web Page.cs
Array arrop=Enum.GetValues(typeof(CommonEmum.Operation));
foreach(CommonEnum.Operation opt in arrop)
{
ddlOperation.Items.Add(new ListItem(opt.ToString(),((Int)opt).Tostring()));
}
Subscribe to:
Posts (Atom)
Dynamics 365 Ribbon Button JavaScript customization function- Displays a popup message when the button is clicked.
function RequestRibbonCustomisation(primaryControl) { var formContext = primaryControl; alert("Coming soon! Work in Progress....
-
CREATE Procedure SP_PaymentToSupplierEmployee_Periodically @tbl_OrganizationId nvarchar(50) AS BEGIN SET NOCOUNT ON; SELECT COUNT(...
-
CRM does not allow direct download of the DLL file from the UI . However, there are several ways to retrieve the plugin DLL from the CRM e...
-
var It is introduced C#3.0 Version. dynamic It is introduced C# 4.0 version 1).Var is statically type of variable, where are dyna...