Using embedded standard HTML forms with ASP.NET

前端 未结 7 1992
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 11:54

I have a standard aspx page with which I need to add another standard HTML form into and have it submit to another location (external site), however whenever I press the sub

相关标签:
7条回答
  • 2020-12-14 12:39

    ASP.NET allows you to have multiple forms on one page, but only one can be runat=server. However I don't think you can nest forms at all.

    You might have to make a new master page, one without a form tag on it so the form will work on that one page only. This is not a good solution, unless you can place the form outside the master pages' form, and use javascript to submit the second form, but that's hardly better. There really is no good solution for what you are trying to achieve, and if so I'd like to hear it. I don't think you can do a POST call from a code-behind, can you? I'm sure there's some way. But that's probably the only solution: from code.

    0 讨论(0)
提交回复
热议问题