I've been trying to include few form in one aspx page, but it keep prompt out error saying there can be only one runat server form in a page, is there any solution to this other than using frame?
Printable View
I've been trying to include few form in one aspx page, but it keep prompt out error saying there can be only one runat server form in a page, is there any solution to this other than using frame?
First of all ask yourself why you need a second form. With asp.net's event model you should not need to have a second form as every control can raise it's own event and thereby not call any other procedure.
I was developing this thing that i need to include sidebar and banner in my page, those 2 were created by my collegeaus in webforms. That's why i must include them to my page. :(
If you need to include stuff use user controls. Anything on a user control can have it's own event code.
I might dare to suggest you read a bit more about asp.net somewhere somehow because it might demonstrate to you how you can do things the way you intend without using multiple forms. Remember the error you are getting is because you have more than one form tag in your page:-
<form blah="blah"></form>.....
<form blah="blah"></form>
not because you are trying to inlude pages.