Click here to Skip to main content
15,904,494 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends,
i have a problem reegarding default button of a page, i have not set any default button in my whole site, still my logout button is working as default button on all pages , so whenever on any page i press enter it logs out ,
i solved this problem by taking a panel control and setting suitable button as default button in page.
but problem is how can i do this when there is no button on a page . and can anybody please tell me why logout button is working as default button when i did not set it .
thanks in advance friends
Posted

Simple JavaScript workaround given here[^]. Hope it helps.
 
Share this answer
 
The first part is already answered, let me answer the other part of the question -
can anybody please tell me why logout button is working as default button when i did not set it
Check the form tag. Are you sure there is no Default button assigned?
The other reason can be that the button has the first tab index set. Set it's tab index to a big value.
 
Share this answer
 
Comments
pawanvats 29-Jun-11 7:13am    
no default button is assigned in the form tag Mr. Ankur, and neither the button has the first tab index set
Ankur\m/ 29-Jun-11 8:23am    
Then in the page load, just add a line of code to set focus to some control other than logout button.
pawanvats 30-Jun-11 5:37am    
I have done it both way .i have set it's tab index to a big value, and also add line of code to set focus to some control other than logout button., but it is not working
Ankur\m/ 30-Jun-11 11:28am    
It's difficult to help you without seeing the code then.

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