How to use FileUpload control inside Gridview use LinkButton??

Posted by prakashmondal5-21103 under ASP.NET AJAX on 4/16/2013 | Points: 10 | Views : 4977 | Status : [Member] | Replies : 1
How to use FileUpload control inside Gridview inside UpdatePanel use LinkButton??

LinkButton or ImageButton HasFile is null.............

Plz help me.............



Posted by: Snaveen on: 2/14/2014 [Member] Starter | Points: 25


Design your gridview like below.


<asp:FileUpload ID="flUpload" runat="server" Width="80%" CssClass="LabelHead" CausesValidation="false" Visible="false"/>
<asp:LinkButton ID="btnupload" CommandName="Edit" runat="server" Text="UpLoad" ToolTip="UpLoad"
CausesValidation="false" />
<asp:LinkButton ID="btnsave" CommandName="Save" runat="server" Text="Save" ToolTip="Save" Visible="false"
CausesValidation="false" />
<HeaderStyle Width="9%" />

and in coe behind wrote below lines of code under gridview itemcommand event.

protected void dgdocument_ItemCommand(object source, DataGridCommandEventArgs e)

if (e.CommandName == "Save")
//perform ur action on here

prakashmondal5-21103, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response