Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
I am working on a project in which i add a image button and some link button on master page.
on imagebutton click event i coded for link button show/hide.
after running the project the default value are loaded as defined, but when i click the imagebutton then the page associate with it's postbackurl property is successfully loaded but link button has no effect. after second click on that imagebutton it will fire the onclick event.

i use button control instead of imagebutton, but there is no chnage.

Can any one solve this problem.
Please help.
Posted
Updated 2-Jan-17 23:15pm

1 solution

The most likely reason is that you flip your value in an event, and set it in page load. Page load fires first, which creates the lag, move your page load code to page prerender and the order will be correct.

Read on how to use your debugger, you can't code without it.
 
Share this answer
 
Comments
Mohd Imran Saifi 28-Jul-12 4:00am    
Thanks for the answer. i forgot about prerender event. Thanx
qasimtyagi 19-Sep-12 3:31am    
i malso finding, link button is not working on single click when we using postbackurl on code behind to redirect the page in new tab
Christian Graus 19-Sep-12 3:35am    
I suspect you need to post a new question, where you post code and define 'not working'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900