Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hiii
I need to Create File Upload control Dynamically,
The Major Problem I m Facing is that when the page gets post back the Controls Disappear
pls Give me a solution from which the control and uploaded file remains after postback
Posted

Hi Remesh

You can use hidden fields to save data on the page and on the server side decide what to do with them.

Like re-create file upload, populate with default data, or with the previously inserted data etc.

Cheers,
Edo
 
Share this answer
 
Put the code that you have written for generating upload control in pageInit method like below
C#
private void Page_Init(object sender, EventArgs e)
{
//your code here
}

There is no need for any activation....just copy paste it in the .cs codebehind file.... Hope this helps
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900