We help IT Professionals succeed at work.

custom javascript for previous/next month links in <asp:calendar> control

prz_ asked
Last Modified: 2013-11-05
I need to change the JavaScript that the <asp:calendar> control generates for the previous/next month links. I don't need to change what it does - just how it's written and how it behaves. I have the control load into modal dialogue window but clicking on the prev/next month links causes a new window to open with something like "javascript:__doPostBack('MyCalendar','V3135')" in the url and the control does nothing. From experimenting with the day links, which used to open a new window as well, I think that changing the links to <a href="javascript:;" onclick="__doPostBack('MyCalendar','V3135'); return false;>" with a dynamic date value will probably fix the problem, except I can't figure out how to make this change. How can I manipulate the script in these links? Or is there some other way to make the calendar behave and not open bogus new windows on me?

Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.