Link to home
Start Free TrialLog in
Avatar of rajasoorya_kc
rajasoorya_kcFlag for India

asked on

ImageButton not redirecting bcos of WebForm_DoPostBackWithOptions

I have a user control embedded in the master page. The user control has a button and an image button. Clicking on the image button would redirect me to a particular page. The intended works just fine in all pages except one. When i look into the generated HTML source, i see that the code generated for the button in the page where it doesnt work is

<a id="ctl00_AccountidPanel_usercontrol_homeLink" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$AccountidPanel$usercontrol$homeLink&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))">Go to Home</a>

and in the other pages it is

<a id="ctl00_AccountidPanel_usercontrol_homeLink" href="javascript:__doPostBack('ctl00$AccountidPanel$usercontrol$homeLink','')">Go to Home</a>
Avatar of rfportilla
Flag of United States of America image

Not terribly familiar with this, but let me take a stab at it.  Is this source code bleeding through?  Check quotes, parentheses, and or html closing tags.  

It looks like the code is not getting executed correctly.  I think it's just a matter of finding what is different about this page.  That's hard to do without knowing more about the structure of your site, how the code is put together, etc.  (At least for me.)

Avatar of muhammadyasir
Flag of Pakistan image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rajasoorya_kc


Thanks Muhammad.
It worked fined when i added causesValidation=false for the link.