maverick786us
September 24th, 2007, 02:54 AM
I am using a gridview in which, there is an ItemTemplate within which I have a LinkButton like this.
<asp:TemplateField HeaderText="Edit">
<ItemStyle Width="40px" />
<ItemTemplate>
<asp:LinkButton ID="imgEdituser" runat="server" CommandArgument='<%#((DataRowView)Container.DataItem)["Certificate_ID"] %>'
CommandName="Edit">
<img src="../../Images/editinfo.gif" alt="Edit Users" border="0" /></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
In this scenerio I am using this
CommandArgument='<%#((DataRowView)Container.DataItem)["Certificate_ID"]
To Extract the certificate ID. But when I run the page I encounter this error.
Compiler Error Message: CS0246: The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?)
Can someone help me in resolving this error. I have included
using System.Data.SqlClient;
Is there any additional Namespace that I have to use?? Although it works with DataBinder.Eval. But I've heard that its not a good Idea, it slows the process if there are too many records in the GridView
<asp:TemplateField HeaderText="Edit">
<ItemStyle Width="40px" />
<ItemTemplate>
<asp:LinkButton ID="imgEdituser" runat="server" CommandArgument='<%#((DataRowView)Container.DataItem)["Certificate_ID"] %>'
CommandName="Edit">
<img src="../../Images/editinfo.gif" alt="Edit Users" border="0" /></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
In this scenerio I am using this
CommandArgument='<%#((DataRowView)Container.DataItem)["Certificate_ID"]
To Extract the certificate ID. But when I run the page I encounter this error.
Compiler Error Message: CS0246: The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?)
Can someone help me in resolving this error. I have included
using System.Data.SqlClient;
Is there any additional Namespace that I have to use?? Although it works with DataBinder.Eval. But I've heard that its not a good Idea, it slows the process if there are too many records in the GridView