473,387 Members | 1,742 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.

CausesValidation

I have a web page which has a bunch of validation controls on it. The page
also has another form which provides a couple of HTML text boxes and an HTML
button. This functionality performs a look up.

My problem is that when the user populates the information and presses the
button, it causes the validation to occur on the page. How can I turn this
off when the HTML button is pressed.

Here is the the code for the HTML form....

<form NAME="EMAILADDR" METHOD="post"
Action="http://somewhere/webapps/utilities/IMCApps?request=EmailLookup">
<span class="txtBold">Last Name: </span><input TYPE="text" Name="last"
maxlength="25" size="25" />
<span class="txtBold">First Name: </span><input TYPE="text" Name="first"
Maxlength="16" Size="16" />
<input Type="submit" class="btn" Value="Look up E-mail Address">
</form>

Thanks in advance for your assistance.
Apr 4 '07 #1
1 2180
Howdy,

There are several ways to solve it.
1. Make input control runat at server by adding
<input Type="submit" class="btn" runat="server" causesvalidation="false"
Value="Look up E-mail Address">
2. or set validatiogroup property of all the validation controls and buttoms
that are linked together:
<asp:RequiredFieldValidator runat="server" ID="val" ErrorMessage="enter some
text" ControlToValidate="txt" ValidationGroup="SubmitDataGroup"
Display="Dynamic" />
<asp:Button runat="server" ID="btn" Text="Submit data"
ValidationGroup="SubmitDataGroup"/>

hope this helps
--
Milosz
"JimHeavey" wrote:
I have a web page which has a bunch of validation controls on it. The page
also has another form which provides a couple of HTML text boxes and an HTML
button. This functionality performs a look up.

My problem is that when the user populates the information and presses the
button, it causes the validation to occur on the page. How can I turn this
off when the HTML button is pressed.

Here is the the code for the HTML form....

<form NAME="EMAILADDR" METHOD="post"
Action="http://somewhere/webapps/utilities/IMCApps?request=EmailLookup">
<span class="txtBold">Last Name: </span><input TYPE="text" Name="last"
maxlength="25" size="25" />
<span class="txtBold">First Name: </span><input TYPE="text" Name="first"
Maxlength="16" Size="16" />
<input Type="submit" class="btn" Value="Look up E-mail Address">
</form>

Thanks in advance for your assistance.
Apr 4 '07 #2

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

Similar topics

0
by: Josh Anderson - remove Zs to reply | last post by:
I have a repeater set up which builds a table containing buttons used to remove that particular item. Elsewhere on the page are validation controls. Although I have set the CausesValidation...
1
by: George Durzi | last post by:
I have an editcommandcolumn in my datagrid, as follows. <asp:editcommandcolumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"> I'd like to set the...
4
by: z. f. | last post by:
Hi, I'm having an aspx page with a server form. i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
1
by: sakieboy | last post by:
Having an issue with the datagrid.... Instead of actually updating everytime someone selects update in the datagrid, I am currently writing an XML file on the server that consists of the datagrid...
28
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when...
2
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation....
2
by: mwieder | last post by:
Given an html anchor button control, in javascript can I tell whether that control is set to cause validation or not? In ASP.NET the property that gets set is CausesValidatation, but in...
1
by: Joseph | last post by:
I have simple app with a textBox, a button and errorProvider. I have all the controls CausesValidation set to true, and the following code: private void textBox1_Validation(object sender,...
0
by: =?Utf-8?B?RG91YnQgb2YgUmFqZWV2IEFN?= | last post by:
Dear all I require certain clarification on following line. This is regarding causesvalidation property of visualstudio 2005 controls. Iam using windows forms not web forms. Inorder to...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.