form-post

Why is my Asp.Net Form arriving empty when I post from Page to Page?

只愿长相守 提交于 2019-11-28 08:47:37
问题 I have the following HTML Code <%@ Page Language="C#" %> <html> <head> <title></title> </head> <body> <form id="frmSystem" method="post" action="target.aspx"> <input id="txtTextField" type="text" /> <input id="btnPost" value="Submit" onclick="javascript:frmSystem.submit();" type="button" /> </form> </body> </html> The target Page is coming up but the form that it is receiving is empty. I have a break point on my target.aspx page and while I can see a form, it's keys are empty and Request[

Why does naming your HTML form submit button “submit” break things?

[亡魂溺海] 提交于 2019-11-27 05:29:53
In ASP.NET webforms and ASP 3 (Classic ASP), I came across an issue whereby naming your form submit button "submit" would "break things". Below is the rendered HTML: <input type="submit" name="Submit" value="Submit" id="Submit" /> I say "break things" because I'm not sure exactly why or what happened. But the symptoms usually were that pressing the submit button sometimes did nothing i.e. it just didn't work. But sometimes it did work. In fact, I just built a quick one page test with the the code below, and submitting worked fine: <form id="form1" runat="server"> <div> <asp:TextBox ID="txtTest

Why does naming your HTML form submit button “submit” break things?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 11:36:28
问题 In ASP.NET webforms and ASP 3 (Classic ASP), I came across an issue whereby naming your form submit button \"submit\" would \"break things\". Below is the rendered HTML: <input type=\"submit\" name=\"Submit\" value=\"Submit\" id=\"Submit\" /> I say \"break things\" because I\'m not sure exactly why or what happened. But the symptoms usually were that pressing the submit button sometimes did nothing i.e. it just didn\'t work. But sometimes it did work. In fact, I just built a quick one page