Category C#.Net
C Sharp Delegates and Plug-in Methods with Delegates
February 20, 2013 Category: C#.Net
Comments:
Difference between int, Int16, Int32 and Int64
February 20, 2013 Category: C#.Net
Comments:
UserController objCont=new UserController();
DataTable dt = new DataTable();
//bind all values in dt
dt=objCont.GetAllRecords();
DataRow[] rows = dt.Select();
foreach (DataRow dr in rows)
{
string name= dr["Name"];
}
Javascript Function in Item Template when using gridview in Asp.net
February 15, 2013 Category: ASP.NET, C#.Net, JAVA SCRIPT
Comments:
<asp:TemplateField>
<ItemStyle CssClass=”lblCenter” />
<ItemTemplate>
<asp:LinkButton ID=”lnkButton” runat=”server” OnClientClick==’<%# String.Format(“javascript:return displayDeleteWarning(\”{0}\”)”, Eval(“ClassId”).ToString()) %>’
</ItemTemplate>
</asp:TemplateField>
Add Java Script Function to gridview cells in Asp.net
February 15, 2013 Category: ASP.NET, C#.Net, JAVA SCRIPT
Comments:
//Add java script function on cells with value
protected void GridUsers_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[1].Attributes.Add(“onClick”, “JavaScript: GetOrderDetail(‘” + Convert.ToInt32(GridUsers.DataKeys[e.Row.RowIndex].Value.ToString()) + “‘)”);
}
}