473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ImageButton control

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
Nov 18 '05 #1
3 921

"Rob Meade" <ro**********@NOSPAMubht.swest.nhs.uk> wrote in message
news:u9**************@TK2MSFTNGP09.phx.gbl...
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
Nov 18 '05 #2
"Hans Kesting" wrote ...
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
Nov 18 '05 #3
"Hans Kesting" wrote ...
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
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bruce W.1 | last post by:
I'm trying to put together a horizontal tab nav in a User Control, and I want to have some mouseOver behavior. This could easily be done with just CSS, however hyperlinking this way (client-side)...
1
by: Henke | last post by:
Hello, I have one ImageButton controls which I initialize in Page_Load and declare on class level. ImageButton save = new ImageButton(); save.ImageUrl = "save.gif" save.Click += new...
3
by: Benjamin Gavin | last post by:
Hi all, I recently stumbled upon a bug in the ASP.NET framework handling of ImageButton based postbacks. The issues derives from the fact that IE and Mozilla handle the case of a missing image...
2
by: CJ Oakwood | last post by:
Morning - I am hoping somebody from this group can help me out here... I have been trying to add an array of ImageButtons to my WebForm however I keep getting an exception that I can't seem to...
1
by: Nathan Sokalski | last post by:
I want to create a pushbutton-like control on my webform that has an image on it. I used to think that this is what the ImageButton control was, but it seems to me that the ImageButton is nothing...
3
by: jens.buchta | last post by:
Hi! I'm using a DataGrid with a template column to display an Image inside of it. I'm hooking into its OnPrerender-Event to set the ImageURL-Property dynamically. Everything works just fine...
3
by: JuniorProgrammer | last post by:
Am trying to add an Image Button into a Datalist at Design time. When I run it it comes up with error: Server tag not well formed. It works perfectly when I add just an Image Control. Please...
0
by: Tom Edelbrok | last post by:
I'm using VS 2005 to develop an intranet asp.net web application and I get a weird situation. If I start out with any ASPX page that contains an ImageButton control followed by a TextBox control,...
4
by: suzanne.boyle | last post by:
Hi, I'm adding an ImageButton as a child to a custom web control and attaching an event handler to it. When the page posts back the event is not being fired however. I initially assumed I had...
3
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, Using ASP .Net, I'm trying to create a ImageButton when the user clicks on a button, this is my code: protected void logout_btn_Click(object sender, ImageClickEventArgs e) {
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.