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 get logged in User's Security Roles using Java Script in dynamic CRM 365.
function GetloggedUser () { var roles = Xrm.Utility.getGlobalContext().userSettings.roles; if (roles === null) return false; ...
-
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ArrayManipulation { ...
-
CREATE Procedure SP_PaymentToSupplierEmployee_Periodically @tbl_OrganizationId nvarchar(50) AS BEGIN SET NOCOUNT ON; SELECT COUNT(...
-
CREATE TABLE [dbo].[tbl_dbLogs]( [LogSerialId] [int] IDENTITY(1,1) NOT NULL, [Error_line] [int] NULL, [ERROR_MESSAGE] [nvarchar](max...