473,386 Members | 1,748 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,386 software developers and data experts.

Question about Validation Controls

Joe
Hi,

I have a form with three text fields and a Submit button. The two text
fields have ReqiredFieldValidator and third text field has
RegularExpressionValidator. The page validation works fine in Internet
Explorer but I noticed that in FireFox, Netscape and Mozilla, they don’t
work.

These validation controls are set to run servside then why they don’t work
in non-IE browser.

Is there any workaround?

Thanks,

Joe

Nov 19 '05 #1
8 1188
=?Utf-8?B?Sm9l?= <Jo*@discussions.microsoft.com> wrote in
news:FB**********************************@microsof t.com:
These validation controls are set to run servside then why they donƒ
Tt work in non-IE browser.


Did you implement the server side event handler for the validation
controls?
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com
Nov 19 '05 #2
Joe
Can you explain what you mean and how to do it?
Thanks
Joe


"Lucas Tam" wrote:
=?Utf-8?B?Sm9l?= <Jo*@discussions.microsoft.com> wrote in
news:FB**********************************@microsof t.com:
These validation controls are set to run servside then why they donÆ’
Tt work in non-IE browser.


Did you implement the server side event handler for the validation
controls?
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com

Nov 19 '05 #3
Joe
MY form code as follows and it works fine in Internet Explorer but doesn't
work in non-IE browsers.

<form id="test" runat="server">
<table >
<tr>
<td><table>
<tr>
<td>*Required Field</td>
<td> </td>
</tr>
<tr>
<td>*First Name</td>
<td><asp:TextBox ID="FirstName" columns="25" runat="server" />
<asp:RequiredFieldValidator
id="RequiredFieldValidator1" runat="server"
ErrorMessage="Please enter your First name." Display="None"
ControlToValidate="FirstName" />
<asp:ValidationSummary id="ValidationSummary1"
ShowMessageBox="True" ShowSummary="False" runat="server"/>
</td>
</tr>
<tr>
<td>*Last Name</td>
<td><asp:TextBox id="LastName" columns="25" runat="server" />
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"
ErrorMessage="Please enter your Last name." Display="None"
ControlToValidate="LastName" />
</td>
</tr>
<tr>
<td>*Email</td>
<td class="grey"><asp:TextBox id="txtEmail" columns="25"
runat="server" />
<asp:RequiredFieldValidator
ID="RequiredFieldValidator5" runat="server"
ErrorMessage="Please enter your Email address." Display="None"
ControlToValidate="Email" />
<asp:RegularExpressionValidator id="valValidEmail"
runat="server"
ControlToValidate="Email"

ValidationExpression="^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\.[a-zA-Z0-9-]+)*(\.[a-z]{2,4})$"
ErrorMessage="Invalid Email address."
Display="None">
</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td></td>
<td><br /><asp:Button id="Submit" OnClick="submit" Text="Submit"
runat="server" />
</td>

</tr>
</table></td>
</tr>
</table>
</form>


"Lucas Tam" wrote:
=?Utf-8?B?Sm9l?= <Jo*@discussions.microsoft.com> wrote in
news:FB**********************************@microsof t.com:
These validation controls are set to run servside then why they donÆ’
Tt work in non-IE browser.


Did you implement the server side event handler for the validation
controls?
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com

Nov 19 '05 #4
in the code behind in onload check Page.IsValid. referencing this property
run the serverside validation routines.

-- bruce (sqlwork.com)
"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
MY form code as follows and it works fine in Internet Explorer but doesn't
work in non-IE browsers.

<form id="test" runat="server">
<table >
<tr>
<td><table>
<tr>
<td>*Required Field</td>
<td> </td>
</tr>
<tr>
<td>*First Name</td>
<td><asp:TextBox ID="FirstName" columns="25" runat="server" />
<asp:RequiredFieldValidator
id="RequiredFieldValidator1" runat="server"
ErrorMessage="Please enter your First name." Display="None"
ControlToValidate="FirstName" />
<asp:ValidationSummary id="ValidationSummary1"
ShowMessageBox="True" ShowSummary="False" runat="server"/>
</td>
</tr>
<tr>
<td>*Last Name</td>
<td><asp:TextBox id="LastName" columns="25" runat="server" />
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"
ErrorMessage="Please enter your Last name." Display="None"
ControlToValidate="LastName" />
</td>
</tr>
<tr>
<td>*Email</td>
<td class="grey"><asp:TextBox id="txtEmail" columns="25"
runat="server" />
<asp:RequiredFieldValidator
ID="RequiredFieldValidator5" runat="server"
ErrorMessage="Please enter your Email address." Display="None"
ControlToValidate="Email" />
<asp:RegularExpressionValidator id="valValidEmail"
runat="server"
ControlToValidate="Email"

ValidationExpression="^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\.[a-zA-Z0-9-]+)*(\.[a-z]{2,4})$"
ErrorMessage="Invalid Email address."
Display="None">
</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td></td>
<td><br /><asp:Button id="Submit" OnClick="submit" Text="Submit"
runat="server" />
</td>

</tr>
</table></td>
</tr>
</table>
</form>


"Lucas Tam" wrote:
=?Utf-8?B?Sm9l?= <Jo*@discussions.microsoft.com> wrote in
news:FB**********************************@microsof t.com:
> These validation controls are set to run servside then why they donf
> Tt work in non-IE browser.


Did you implement the server side event handler for the validation
controls?
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com

Nov 19 '05 #5
In VS.NET, you don't need to do anything to implement the server-side events
(unless you are using a Custom Validator).
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
=?Utf-8?B?Sm9l?= <Jo*@discussions.microsoft.com> wrote in
news:FB**********************************@microsof t.com:
These validation controls are set to run servside then why they donf
Tt work in non-IE browser.


Did you implement the server side event handler for the validation
controls?
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com

Nov 19 '05 #6
"Scott M." <s-***@nospam.nospam> wrote in
news:e7**************@TK2MSFTNGP15.phx.gbl:
In VS.NET, you don't need to do anything to implement the server-side
events (unless you are using a Custom Validator).


Just incase the guy was using a custom validator.

In anycase, to the OP - did you call Page.Validate?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com
Nov 19 '05 #7
Hi Joe,

Let's get back to your original question. Yes, there is a way to get
client-side validation to work with non-IE browsers. ASP.NET 2.0 and my
Professional Validation And More (http://www.peterblum.com/vam/home.aspx)
are two solutions. For details on this issue and much more knowledge about
the Microsoft validators, see this article: www.aspalliance.com/699.

I also noticed that in your code, your ValidationSummary control has
ShowMessageBox=true and ShowSummary=false. The ShowMessageBox feature
requires client-side validation. On non-IE browsers, the ASP.NET 1.x
validators simply will not show anything for the ValidationSummary. So if
you want this to work, you will have to consider the alternatives (my
software, other third party controls, or ASP.NET 2.0).

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
Hi,

I have a form with three text fields and a Submit button. The two text
fields have ReqiredFieldValidator and third text field has
RegularExpressionValidator. The page validation works fine in Internet
Explorer but I noticed that in FireFox, Netscape and Mozilla, they don't
work.

These validation controls are set to run servside then why they don't work
in non-IE browser.

Is there any workaround?

Thanks,

Joe

Nov 19 '05 #8
Joe
Thanks guys, I noticed that I wasn’t using Page.IsValid and then if the empty
form is submitted then I user can’t submit the form but because I am using
ShowMessageBox="True" ShowSummary="False" to display an alert pop-up window
in IE, how do I show a message to user in non-IE on postback?

Any clues and thanks for your great help.

joe
"Lucas Tam" wrote:
"Scott M." <s-***@nospam.nospam> wrote in
news:e7**************@TK2MSFTNGP15.phx.gbl:
In VS.NET, you don't need to do anything to implement the server-side
events (unless you are using a Custom Validator).


Just incase the guy was using a custom validator.

In anycase, to the OP - did you call Page.Validate?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Horrible experience at Newmarket Volvo:
http://newmarketvolvo.tripod.com

Nov 19 '05 #9

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

Similar topics

7
by: Calan | last post by:
Mike, Your code on the dynamic input checking was excellent and very well explained. (The only thing I had to do was change the test for text input to be "1 > len of text", instead or "0 >...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
6
by: Nedu N | last post by:
Hi, I want to have confirmation(Yes/No) on a button of the webform in which there are many validation controls. I want all the validation controls to be triggered first and then Yes/No...
3
by: Filippo | last post by:
Ciao! I've been developing my application for a while and after testing under Mozilla, I've noticed that validation controls are not rendered at all! Any ideas or/and suggestions? thanks, ...
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...
6
by: Stephen | last post by:
Hi, the validation controls dont work on Netscape or Mozilla and only on Internet Explorer why? How do i correct this problem? Thanks
2
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the...
5
by: john.livermore | last post by:
I am successfully using the client side validation controls, but there are a couple aspects of their behavior that I wish to modify. I cannot see how to accomplish this through the properties, but...
6
by: Bill44077 | last post by:
Hi, I am new to the MVP pattern and one of the main reasons that we are going this route is because we are doing Scrum with 30 day sprints - so we have a continually morphing design. We are...
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
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: 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
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
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.