Avatar of rajasoorya_kc
rajasoorya_kc
Flag 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>
ASP.NET

Avatar of undefined
Last Comment
rajasoorya_kc

8/22/2022 - Mon
rfportilla

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.)

ASKER CERTIFIED SOLUTION
muhammadyasir

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
rajasoorya_kc

ASKER
Thanks Muhammad.
It worked fined when i added causesValidation=false for the link.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck