Problem with DefaultButton behaviour on Page inside MasterPage containing Validators

  • Thread starter Evert Wiesenekker
  • Start date
E

Evert Wiesenekker

I have a mail page with a send button containing three validators (2
required val. and 1 expression val.). The masterpage contains 3
imagebuttons.

Now when I press enter the first time the validators do their work. But
when I press enter again one of the imagebuttons on the masterpage is
fired.

When I remove al validators everything works fine...

I tried the following options for setting the DefaultButton:

Option 1

HtmlForm mainForm = (HtmlForm)Master.FindControl("masterForm");
mainForm.DefaultButton = sendImageButton.UniqueID;

Option 2
Page.Form.DefaultButton = sendImageButton.UniqueID;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top