Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a add document button on my aspx page. on adddocument button click i want to add some controls on the page like fileupload control, textbox control etc.

problem-
i want that button to work every time it was clicked even after postback or the controls are present on the page.

please any one give some idea or help me to solve my problem...

thanks in advance
Posted

One way is that create a separate form in which the functionality of the File Upload is defined as per the requirement; and on the click of the button open this form as a model form.
 
Share this answer
 
Comments
Kriti Sharma 10400841 16-Oct-14 3:22am    
i have found a link on codeproject which is
http://www.codeproject.com/Articles/35360/ViewState-in-Dynamic-Control

but i don't understand how to store these data into sql server
In the above said link the controls are added using the ViewState of the page. The numbers are controls added are managed by the loop which is used to display the controls. In order to store the last entry in the database the two way are there:

1. Make a key field as primary key and when loading the controls using the view state add the controls in database also.

2. Get only the last values of the loop and that is passed to the function to add data in database
 
Share this answer
 

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