.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

Add dynamic FileUpload Control at runtime in asp.net

Posted By: Ramesh     Posted Date: April 01, 2011    Points:5   Category :ASP.Net
how to Add dynamic FileUpload Control at runtime in asp.net with C#

Responses
Author: shankey             
Posted Date: April 01, 2011     Points: 20   

Hi,
Add following button in aspx page.
<asp:Button runat="server" ID="btnOnthfly" Text="Upload control on the fly"
onclick="btnOnthfly_Click" />

Generate following event of button and write following code in it
protected void btnOnthfly_Click(object sender, EventArgs e)
{
FileUpload fu = new FileUpload();
fu.ID = "fu";
form1.Controls.Add(fu);
}

Thanks,
Shankey

Shankey


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