Solved

ImageButton not redirecting bcos of WebForm_DoPostBackWithOptions

Posted on 2010-09-08
3
1,004 Views
Last Modified: 2012-05-10
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>
0
Comment
Question by:rajasoorya_kc
3 Comments
 
LVL 9

Expert Comment

by:rfportilla
ID: 33633626
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.)

0
 
LVL 5

Accepted Solution

by:
muhammadyasir earned 500 total points
ID: 33633640
0
 

Author Closing Comment

by:rajasoorya_kc
ID: 33633697
Thanks Muhammad.
It worked fined when i added causesValidation=false for the link.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now