One of the Comments that I see in,
UseSubmitBehiour="true" i.e., <input type =
"submit"> ,
Here I am using the Default Behavior of Browser to post
the Form to server
Because I am not wants to use a __doPostBack function with this
Button for security reason because a Malicious User
can call the __doPostBack function to call the
Server Side Button Event,
<%@ Page EnableEventValidation="true"
......
<asp:TextBox ID="TextBox1" runat="server"
onchange="this.form.__EVENTTARGET.value='Button1';
this.form.submit();"></asp:TextBox>
<asp:Button Enabled="false"
ID="Button1"
runat="server" Text="Buttonabc"
OnClick="Button1_Click" />
Here the server side Event is executing from text changed
of a Textbox, calling Server Side Button which is disabled,
1) Why ASP.NET execute an Event coming which uses
__EVENTTARGET and the Button is not using this
Behaviour?
2) Further for a Button which is disabled from Server Side,
Is EventValidate
Method calling this event as Valid PostBack?
However for an Button
Visible="False"
EventValidate Method calling this event as Invalid PostBack
I will ask Peter, kamran and anyone, that what are the
reasons.
We All move to our original place.
Don't forget.
Imran Baloch