ImageButton control

R

Rob Meade

Hi,

I have a webform where a user can enter text - this text will then be
emailed to subscribers of a chosen subject.

I have added 3 ImageButton controls to the bottom of the page - on the left,
"Back", on the right "Send" and in the middle "Preview" - I dont expect I
need to explain them - but I will :)

Send should submit the form and process the text to send to email (seems to
be ok)
Preview will either goto another webform and display what the email message
will look like (as there is a header, body and footer to the message)
Back will take the user back the previous page which allows them to choose
the 'subject' for the email (database driven)...

The problem I'm having is that the buttons are ALL triggering the validation
(the javascript stuff for missing fields and so on)....this should happen
for the Send and Preview buttons, but for back - the content of the form
should be ignored, and simply take the user back.

Can someone help me out please - I'm quite new to ASP.Net and this is my
first 'mini' app using it.

Any/all help appreciated,

Regards

Rob
 
H

Hans Kesting

Rob Meade said:
Hi,

I have a webform where a user can enter text - this text will then be
emailed to subscribers of a chosen subject.

I have added 3 ImageButton controls to the bottom of the page [snip]

The problem I'm having is that the buttons are ALL triggering the validation
(the javascript stuff for missing fields and so on)....this should happen
for the Send and Preview buttons, but for back - the content of the form
should be ignored, and simply take the user back.

You should set "CausesValidation" to "false" for this "Back" button


Hans Kesting
 
R

Rob Meade

...
You should set "CausesValidation" to "false" for this "Back" button

Hello Hans,

Many thanks for your reply - I will go and try that now.

Regards

Rob
 
R

Rob Meade

...
You should set "CausesValidation" to "false" for this "Back" button

Hi Hans,

That worked perfectly - many thanks for the reply and very useful
information :)

Regards

Rob
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top