Bind Details View Data Then Retrieve the Values

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 747
Bind Details View Data Then Retrieve the Values
=====================================================
protected void Bt2_Click(object sender, EventArgs e)
{
string ext = "";
for (int i = 0; i < Det.Rows.Count ; i++)
{
ext+= Det.Rows[i].Cells[0].Text + " : " + Det.Rows[i].Cells[1].Text;
}
Response.Write(ext);
}

<asp:DetailsView ID="Det" runat ="server" >
<Fields>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID="lbl1" runat ="server" Text=' <%#Eval("username") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Fields>
</asp:DetailsView>

Comments or Responses

Login to post response