开发者

Combining JQuery and Ajax Submission with ASP.NET fails in non trivial cases

开发者 https://www.devze.com 2023-02-09 20:42 出处:网络
There is a example: Combining JQuery Form Validation and Ajax Submission with ASP.NET by Haack I just want to use AjaxSubmission to asp.net forms from there.

There is a example: Combining JQuery Form Validation and Ajax Submission with ASP.NET by Haack I just want to use AjaxSubmission to asp.net forms from there. So, it works in simple cases when input id is like "submitButton".

<input 开发者_Go百科type="hidden" name="<%= submitButton.ClientID %>" 
value="Send Comment" />
<asp:Button runat="server" ID="submitButton" 
OnClick="OnFormSubmit" Text="Send Comment" />

And when I'm putting button in any container and id becomes smth like: "ctl00_ContentPlaceHolder1_train1" it fails... Event doesn't fire

The only difference I found: doPostback sends ctl00%24ContentPlaceHolder1%24submitButton

Why he replaces underscores with %24?


Solved, just forgot about $ simbols in names.

0

精彩评论

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