How can i bind a Database field value to a hidden field inside a gridview

Posted by Dorababu on Stack Overflow See other posts from Stack Overflow or by Dorababu
Published on 2011-02-18T07:09:27Z Indexed on 2011/02/18 7:25 UTC
Read the original article Hit count: 166

Filed under:
|
|
|

I use the following to bind a field from the table to a hidden field inside a gridview but i am getting the error as System.Data.DataRowView' does not contain a property with the name 'AccountType'.

This is how i assigned

      <asp:TemplateField>
               <ItemTemplate>
     <asp:HiddenField ID="hdnAccntType" runat="Server" Value='<%#Eval("AccountType") %>' />
                </ItemTemplate>
                </asp:TemplateField>

Is it correct or i have to make any corrections

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mysql