开发者

Adding a Form to a WebForm? .NET

开发者 https://www.devze.com 2023-03-08 13:41 出处:网络
I have a WebForm in my app and when I add a second <form></form> it crashes the script because I\'m only allowed one Form.

I have a WebForm in my app and when I add a second <form></form> it crashes the script because I'm only allowed one Form.

What is the best way to include a 2nd form on the script?

Should I be calling it with a UserControl instead?

Many thanks for any gui开发者_如何学Pythondance.


If you want the second form to be a client side form (no runat="server" attribute), simply place it outside the server side form.

If you want two server side forms, this is not possible - one of the limitations of ASP.NET webforms.


You can do that... ASP.NET says there can't be 2 or more forms with runat = server... Just make you new form NOT runat = server.. Plain simple HTML form

0

精彩评论

暂无评论...
验证码 换一张
取 消