c# asp.net Why doesn't the request page see then posted values? -
this codebehind second page.
namespace ns1 { public partial class second : system.web.ui.page { protected void page_load(object sender, eventargs e) { int loop1; namevaluecollection coll; coll = request.form; string[] arr1 = coll.allkeys; (loop1 = 0; loop1 < arr1.length; loop1++) { lbldebug.text = lbldebug.text + "form: " + arr1[loop1] + "<br>"; } } } }
this 1st page form:
<form id="form1" runat="server" method="post" action="second.aspx"> <div> type: <asp:textbox id="testtype" runat="server"></asp:textbox> data: <asp:textbox id="testdata" runat="server"></asp:textbox> <asp:button id="button1" runat="server" text="button" /> <asp:label id="lbldebug" runat="server" text="text" /> </div> </form>
i can point form http://httpbin.org/post , see expect see.
but in codebehind of second page arr1 doesn't have anything. arr1.lenght = 0.
why?
Comments
Post a Comment