开发者

.Net 2.0 Form tag

I have a .net application with aspx coded like:

...
<form id="Fac_Status" action="TEST.aspx?Section=rel" method="post" runat="server">
<asp:Button id="BTN_ActSTADD" runat="server" Text="Submit" CausesValidation="True" OnClick="BTN_ActSTADD_Click"></asp:Button>
</form>
...

Is there any possibility (environmental, settings, framework changes) that could exist where upon clicking Submit button开发者_StackOverflow中文版, the button event handler is activated? In above example, currently the page posts to the Test.aspx set in the form tag.

But some time back - according to my predecessor, this page used to trigger the button event handler. There was no code change.


You are posting your page(Test.aspx) to another page(another_test.aspx). This won't work. Change action="TEST.aspx?Section=rel" to action="ANOTHER_TEST.aspx?Section=rel" and set AutoEventWireup="true" in page directive and see click handler in action.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜