How to use FileUpload control inside Gridview use LinkButton??

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

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

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



..................Prakash




Responses

Posted by: Jitendrasoft09 on: 4/30/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,
You can use fileupload inside your gridview, Please look into below link that would be helpful for you.
http://www.c-sharpcorner.com/forums/thread/207172/how-to-use-fileupload-inside-gridview-inside-updatepann.aspx

Jitendra Kumar
If my post helps you, plz mark as an answer.

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

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

Up
0
Down
Hi,

Design your gridview like below.

<asp:TemplateColumn>

<ItemTemplate>
<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" />
</ItemTemplate>
<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