I have an interesting problem that I am trying to figure out. I am following some code examples and for the life of me I can't figure out why I am getting entirely different results even though they are using the same libraries.
The code example specifies OnClientClick declaritively:
<asp:Button ID="Button" runat="server" Text="Click Me" OnClientClick="disableSubmit();return false;"
OnClick="Button_Click" />
View source gives me this:
<input type="submit" name="Button" value="Click Me" onclick="disableSubmit();return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("Button", "", true, "", "", false, false))" id="Button" /><br />
On my code I do the same thing:
<asp:Button ID="ValidateButton" runat="server" OnClientClick="disableSubmit();return false;" OnClick="ValidateButton_Click" Text="Validate" />
but it gives me this:
<input type="submit" name="ValidateButton" value="Validate" onclick="disableSubmit();return false;" id="ValidateButton" />
It appears that the ASP.NET generated gibberish isn't appended to my code like the way it does on his/her code. What's happening here?