<asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="customerds1" Height="178px" Width="438px" AutoGenerateRows="False" CellPadding="4" DataKeyNames="CusId" ForeColor="#333333" GridLines="None" OnPageIndexChanging="DetailsView1_PageIndexChanging" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" Visible="False"> <footerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White" /> <commandrowstyle backcolor="#E2DED6" font-bold="True" /> <rowstyle backcolor="#F7F6F3" forecolor="#333333" /> <fieldheaderstyle backcolor="#E9ECF1" font-bold="True" /> <pagerstyle backcolor="#284775" forecolor="White" horizontalalign="Center" /> <fields> <asp:TemplateField HeaderText="Customer ID:" SortExpression="CusId"> <edititemtemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("CusId") %>'> </edititemtemplate> <insertitemtemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CusId") %>'> </insertitemtemplate> <itemtemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("CusId") %>'> </itemtemplate> <asp:BoundField DataField="CompName" HeaderText="CompanyName:" SortExpression="CompName" /> <asp:BoundField DataField="CompAdd" HeaderText="CompanyAdd:" SortExpression="CompAdd" /> <asp:BoundField DataField="Tel" HeaderText="Tel:" SortExpression="Tel" /> <asp:BoundField DataField="Fax" HeaderText="Fax:" SortExpression="Fax" /> <asp:BoundField DataField="ContPerson" HeaderText="Contact Person:" SortExpression="ContPerson" /> <asp:TemplateField HeaderText="Sales Person:" SortExpression="SalesPerson"> <edititemtemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SalesPerson") %>'> </edititemtemplate> <insertitemtemplate> <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("SalesPerson") %>'> </insertitemtemplate> <itemtemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("SalesPerson") %>'> </itemtemplate> </fields> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <editrowstyle backcolor="#999999" /> <alternatingrowstyle backcolor="White" forecolor="#284775" />
string cusId = DetailsView1.Rows[0].Cells[1].Text;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)