Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to export gridview data to pdf using the code provided on www.webcodeexpert.com/2013/06/bind-and-export-gridview-data-to-pdf.html.
Its working fine if i am not using master's content page. But on using content page it is showing error "A page can have only one server-side Form".
The reason i found is that on master page there is already a form tag and in content page i am trying to create a new form tag with runat="server" which is not allowed. Is there any solution to solve this problem?
Posted
Updated 6-Mar-17 0:26am
Comments
Why are you trying to add another form?
xpertzgurtej 15-Dec-15 2:13am    
because my gridview has a hiddenfield Control. If i don't generate dynamic form tag then i get the error 'ctl00_ContentPlaceHolder1_gridView_ctl00_hdEmployeeid' of type 'HiddenField' must be placed inside a form tag with runat=server.
Sinisa Hajnal 15-Dec-15 3:10am    
But it is already in masters form.

Either remove form form the master page (if you're not using it), remove runat="server" from content page (use just form). Good luck
xpertzgurtej 6-Mar-17 6:20am    
.
Graeme_Grant 6-Mar-17 8:27am    
Why? Please don't!

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