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)
How to Setup SLA in CE module
Setting Up SLA (Service Level Agreements) in Dynamics 365 Customer Engagement (CE) A Service Level Agreement (SLA) in Dynamics 365 CE (Cust...
-
CREATE Procedure SP_PaymentToSupplierEmployee_Periodically @tbl_OrganizationId nvarchar(50) AS BEGIN SET NOCOUNT ON; SELECT COUNT(...
-
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ArrayManipulation { ...
-
tbl_employee EmployeeId EmployeeName Gender 1 ABC male 2 YYC ...