Skip to main content

Posts

Showing posts from April, 2010

How To Render Thead and Tbody tag in GridView

In this post i am going to share tips and tricks about how to generate Thead and Tbody in gridview because default GridView in asp.net generate table>tr>th type of structure. uncomment this statement and see the result //Uncomment this line for THEAD and TBODY //grdPage.HeaderRow.TableSection = TableRowSection.TableHeader;<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title></head><body><formid="form1"runat="server"><div><asp:GridViewID="grdPage"runat="server"></asp:GridView></div></form></body></html>using System; using System…

How to validate form field using Jquery in asp.net

In this post i am going to show how to validate form field using Jquery in asp.net <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><scriptsrc="scripts/jquery.js"type="text/javascript"></script> <style type="text/css"> .label { float: left; width: 120px; } .textbox { width: 200px; } .error { color: red; padding-left: 10px; } div { padding: 5px; } </style> <script type="text/javascript"> …