Not able to add form tag inside Content Page

1.1k Views Asked by At

I have a Master Page and a Content Page. I have Check In Check Out small form in Master Page and I have a Contact form in Content page. But while running the website, I am getting the error which says:A page can have only one server side form tag. When I remove the form tag from the Content Page. Then,it says the Textbox should be placed within a form tag. But I want both the forms,since both are necessary. So please help me so that I can have both the forms.

2

There are 2 best solutions below

0
VDWWD On BEST ANSWER

There can be only one <form> tag on the whole page, that is just how webforms work. In your case it is in the master page. The pages using the Master do not and should not have <form> tags.

But from your question it seems that you think you are using master pages, but are actually not. See this page as to how the .aspx pages are supposed to look with master and child pages.

https://learn.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-getting-started/master-pages/creating-a-site-wide-layout-using-master-pages-cs

0
Ravi Kumar Kasim On

It is not possible to add more than one form in a single aspx file. Otherwise try to use iframe in that page.Inside the iframe we can use another aspx page.