Reputation: 13763
I am trying to add some functionality to a page I have inherited, but I am unable to do a postback on the page. This is how the button appears when I view source :
<input type="submit" name="ctl00$ContentBody$btnUpload" value="Upload" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentBody$btnUpload", "", true, "", "", false, false))" id="ctl00_ContentBody_btnUpload" />
And this is how it looks in design mode :
<asp:Button ID="btnUpload" runat="server" OnClick="UploadFile_Click" Text="Upload" />
Can anybody please help with this, I am tearing my hair out trying to figure out why I can't postback!
Upvotes: 0
Views: 1266
Reputation: 86
Check your validation control enclosed by container which might be display none. that causes same problem in my case. Just Check all validation control mostly in case where you build single page application or tabbed pages out of which one of tab has validation control.
Upvotes: 0
Reputation: 887
So when you click submit nothing happens?
Ensure that it is not because one of the validation controls on the page is returning false.
Upvotes: 5