Form Validation, The Enter Key and MultiView
Posted on 2009-04-07
I have a page that uses the MultiView control. On page load View1 is visiable and View2 is hidden.
View1 of my MultiView has a single textbox with a button used to check a client ID. The textbox has several validation controls to insure the ID entered is correct.
View 2 has several textboes and a button to update my database.
Both views are wrap around a single form.
My problem has to do with the validation of View1. If I hit the "Enter" key on my keyboard, nothing happens. In order for the validation to work I have to click on the button in the browser.
Now I've heard that you can set a Default Button in the form. GREAT! But I have TWO button on the page in the same form. One in View1 and one in View2.
How can I set the default button based on the View that is currently visable? Do I need to use "Panels" rather than "Views"? Any help would be appriciated.