I created a grid and I would like to be able to edit an image. For that reason I added an edit template with a file upload and a link button. But when I tried to access the fileupload with the following code I am getting null for the fileupload control.
<asp:TemplateField HeaderText="Test" SortExpression="calories">
<
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Bind("Image") %>'/>
</ItemTemplate> <EditItemTemplate> <asp:FileUpload ID="FileUpload1" runat="server" /> </EditItemTemplate>
</asp:TemplateField>
protected void grdTest_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
if (e.CommandName == "UpdatePhoto")
...
Go to the complete details ...