0

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, 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.

hyperkittie
  • 641
  • 6
  • 16
  • So you want to execute the "click" handler code. Isn't it? – KV Prajapati Sep 28 '11 at 08:13
  • If the name of page is other than TEST.aspx, click handler won't be processed. If it is, please post page directive. Possibly you need to modify AutoEventWireup = "true" – hungryMind Sep 28 '11 at 08:19
  • @AVD: I want to know if there's any way to execute the click handler if the code remains as it is. – hyperkittie Sep 29 '11 at 01:17
  • @hungryMind, this is the page directive: <%@ Page Language="vb" ClientTarget="downlevel" CodeBehind="Another_Test.aspx.vb" AutoEventWireup="false" Inherits="ABC.AnotherTest" %> – hyperkittie Sep 29 '11 at 01:19
  • @hyperkittie - One possibility is there. You have to add extra statements in click handler. What is the name of current .aspx page? – KV Prajapati Sep 29 '11 at 01:20

1 Answers1

0

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.

hungryMind
  • 6,931
  • 4
  • 29
  • 45