<asp:GridView ID="GridView1" runat="server"> <asp:TemplateField HeaderText="SName" <ItemTemplate> <a href='<%#"StuDetails.aspx?Id="+DataBinder.Eval(Container.DataItem,"Id") %>' target="_blank"> <%#Eval("SName")%> </a> </ItemTemplate> </TemplateFiled> <asp:BoundField DataField="SName" HeaderText="Student Name" /> <asp:BoundField DataField="SMarks" HeaderText="Student Marks" /> <asp:BoundField DataField="SDOB" HeaderText="Student DOB" />
protected void GridView1_RowCreated1(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover", "this.className='mouseover'"); e.Row.Attributes.Add("onmouseout", "this.className='mouseout'"); e.Row.Attributes["onclick"] = this.Page.ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)