i have a login page with a login button and reset button.now when the user enter its id and password and then press enter both the user id and password textbox becomes blank.i checked the tabbed index of the two button thinking it may be due to the reset button but found it to be ok.i want that once the user types the password and press enter it must sucessfully login and not clear the textboxes.how do i do it.

Recommended Answers

All 4 Replies

put your login controls into asp:panel then set asp:panel's defaultButton attribute to your login button Id.

Funny, but it goes by which control is created first. Otherwise you have to have set which is which. To be honest, your btnSubmit should be run on the server, and your reset button should be a reset form button in HTML.

And you won't encounter this problem.

but how to assign color and font to a html button.i tried but was unsuccessful in doing so

set the style attribute:

style="font-size:10px;font-weight:bold;color:red;"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.