.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Datagrid with FileUpload Control

Posted By: Jayakumar     Posted Date: March 03, 2011    Points:2   Category :ASP.Net
Hi

I have datagrid with fileupload control but when i click new
row precious upload control values cleared how to assign
upload control i have try this
fup.filename='; but did not achieve my requirement

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: March 03, 2011     Points: 20   

Hi,

When Postback event occurs, the Fileupload values gets clear for security reasons.

You can use asp.net ajax update panel for the controls causing a postback.

Consider the below code.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
//Control causing a postback
<asp:Button ID="btnNewRow" runat="server" Text="New Row"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:FileUpload ID="Fld1" runat="server" />


Hope this helps.

Author: Karthikeyan Anbarasan       [Moderator]      
Posted Date: March 04, 2011     Points: 20   

Hi,

Check this link

http://www.codeproject.com/Questions/51550/Placing-a-file-upload-control-inside-a-gridview.aspx

Thanks
Karthik
http://www.f5debug.net
Mark as Answer if the answer solves your issue!!!


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend