lundi 26 janvier 2015

WebForm_PostBackOptions use actionUrl with ampersand

I use a overridden LinkButton and get this HTML-element



<a id="ucSearchForm_lbSearch" tabindex="3" class="button" rel="nofollow" href='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ucSearchForm$lbSearch", "", false, "", "http://localhost:81/main-jobs/rgn-Islamabad-+-FCA-%26-AJK", false, true))'><p>Find</p></a>


WebForm_DoPostBackWithOptions and WebForm_PostBackOptions is standart asp.net webform js function and I don't have access to them.


When I click on the link, WebForm_PostBackOptions receives not the correct link("http://localhost:81/main-jobs/rgn-Islamabad-+-FCA-&-AJK" - automatically decoded ampersand) and I do not get postBack. If i use web console and run the code itself, then everything is working correctly. I get link "http://localhost:81/main-jobs/rgn-Islamabad-+-FCA-%26-AJK".


Is it possible to solve this problem, or should look for a different approach? Thank you for your attention.


Aucun commentaire:

Enregistrer un commentaire