By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,689 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,689 IT Pros & Developers. It's quick & easy.

Netscape required field validation problems

P: n/a
I have an interesting problem when I run the following
code in Netscape (7.02) vs. IE. This page works great in
IE and all my controls bring up the validation summary
dialog box if the required field is not filled out.
However in Netscape NONE of the required field
validations occurs at all in Netscape. The form is
posting correctly because I can walk through the post
back process. Any ideas why this is happening or how to
fix it?

Thanks in advance...

Here is the page:
<%@ Page Language="vb" SmartNavigation="false"
AutoEventWireup="false" Codebehind="SignUpToday2.aspx.vb"
Inherits="PCBC.SignUpToday2" EnableViewState="True"%>
<%@ Register TagPrefix="Navigation" TagName="Bottom"
Src="..\bottom.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Left"
Src="..\left.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Top"
Src="..\top.ascx" %>
<%@ OutputCache Duration="60" VaryByParam="*"
VaryByCustom="browser" %>
<HTML>
<HEAD>
<title>SIGN UP TODAY</title>

<form id="Form1" method="post"
runat="server">
<!--start entire page
table with 3 rows -->
<table height="100%"
cellSpacing="0" cellPadding="0" width="100%"
align="center" border="0">
<tr>
<!--start
Top Nav -->
<td
vAlign="top" align="left"
bgColor="#000000"><NAVIGATION:TOP id="Top" runat="server"
NAME="Top"></NAVIGATION:TOP></td>
<!--end
Top Nav --></tr>
<tr>
<td
vAlign="top" align="left" bgColor="#000000" height="100%">

<!--start main table with 2 columns -->

<table cellSpacing="0" cellPadding="0"
width="100%" border="0">

<tr>

<!--start Left Nav table with 3 rows -->

<!--<td bgcolor="#000000" align="left"
valign="top" width="108">

<!-- <Navigation:Left runat="server"
ID="Left" NAME="Left"></Navigation:Left>

<!--</td>-->

<td bgColor="#000000">

<!--------------------------------
-------->

<table cellSpacing="0"
cellPadding="0" width="100%" align="center" border="0">

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>

</b></font>

</td>

</tr>

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>


</b></font>

</td>

</tr>

<tr>

<td vAlign="top"
align="center" width="74%" bgColor="#000000" height="281">

<table
height="227" cellSpacing="0" cellPadding="0" width="95%"
align="center" border="0">
<tr>
<td width="24"
background="../images/frame_top_left.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="736"
background="../images/frame_top_mid.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="29"
background="../images/frame_top_right.jpg"
bgColor="#000000" height="15">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_left.jpg" bgColor="#000000"
height="210">&nbsp;</td>
<td vAlign="middle" align="center" width="736"
bgColor="#000000" height="210">
<table cellSpacing="0" cellPadding="0"
width="100%" border="0">
<tr>
<td bgColor="#000000"
colSpan="2">Please enter your contact information below.
All
fields with an
asterisk (*) next to them are required.<BR>
<FONT
color="red">You must be at least 18 years old to become a
member of

PCBootyCall.</FONT>
<br>
<br>

<asp:validationsummary id="ValidationSummary1"
runat="server" ShowMessageBox="True" HeaderText="<b>The
following errors were detected:</b>"

Height="24px" Width="430px"
ShowSummary="False"></asp:validationsummary></td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="27">Email Address:
</td>
<td bgColor="#000000"
height="27"><asp:textbox id="txtEmailAddress"
Height="20px" Columns="45" Width="231px" MaxLength="50"
Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator1" runat="server"
ControlToValidate="txtEmailAddress"

ErrorMessage="Email Address must be entered.">
*</asp:requiredfieldvalidator><asp:comparevalidato
r id="CompareValidator1" runat="server"
ControlToValidate="txtEmailAddress2" ErrorMessage="Email
Addresses must match."

ControlToCompare="txtEmailAddress"
Display="Dynamic">*</asp:comparevalidator><asp:regularexpr
essionvalidator id="RegularExpressionValidator1"
runat="server" ControlToValidate="txtEmailAddress"

ErrorMessage="Invalid Email Address"
Display="Dynamic" ValidationExpression="\w+([-+.]\w+)*@\w+
([-.]\w+)*\.\w+([-.]\w+)
*">*</asp:regularexpressionvalidator><br>
<FONT
color="red">Note: In order to complete the sign up
process, we will need to
send a
confirmation message to the email address you enter
above.</FONT> Be
sure to include
your "@serviceprovider.com" domain.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="24">Confirm Email
Address:
</td>
<td width="297"
bgColor="#000000" height="24"><asp:textbox
id="txtEmailAddress2" Height="20px" Columns="45"
Width="231px" MaxLength="50" Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator2" runat="server"
ControlToValidate="txtEmailAddress2"

ErrorMessage="Confirm Email Address must be
entered"
Display="Dynamic">*</asp:requiredfieldvalidator><br>
Please re-enter
your email address.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000">Name:
</td>
<td width="297"
bgColor="#000000"><asp:textbox id="txtFirstName"
Height="20px" Width="99px" MaxLength="15" Runat="server"
ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator3" runat="server"
ControlToValidate="txtFirstName" ErrorMessage="First Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><a
sp:textbox id="txtLastName" Height="20px" Width="124px"
MaxLength="25" Runat="server" ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator4" runat="server"
ControlToValidate="txtLastName" ErrorMessage="Last Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><b
r>
First

Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Last Name
</td>
</tr>


<tr>
<td width="161"
bgColor="#000000">&nbsp;
</td>
<td width="297"
bgColor="#000000"><br>
<asp:imagebutton
id="imgbtnContinue" runat="server"
ImageUrl="../Images/button_continue.jpg"></asp:imagebutton
</td>

</tr>
<TR>
<td bgColor="#000000"
colSpan="2"><br>
<FONT
color="red"><B>Note to AOL and CompuServe Members:</B><BR>
Make sure
your Mail Controls are set to receive emails from

www.pcbootycall.com. If you have Internet email
blocked, you will need to
update
your Mail Controls. To make this update, enter the
Keyword "Mail
Controls"
on AOL or CompuServe</FONT>
</td>
</TR>
</table>
</td>
<td width="29"
background="../images/frame_right.jpg" bgColor="#000000"
height="210">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_bottom_left.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="736"
background="../images/frame_bottom_mid.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="29"
background="../images/frame_bottom_right.jpg"
bgColor="#000000" height="2">&nbsp;</td>
</tr>

</table>

</td>

</tr>

</table>

<!--------------------------------
--------></td>

</tr>

</table>
</td>
<tr>
<!--start
Bottom Footer -->
<td
vAlign="top" align="left" width="100%"
bgColor="#000000"><NAVIGATION:BOTTOM id="Bottom"
runat="server" NAME="Botttom"></NAVIGATION:BOTTOM></td>
<!--end
Bottom Footer --></tr>
</table>
</form>
</font>
</body>
</HTML>
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

if you mean client-side validation, that works only on IE by default. Other
browsers need to utilize server-side validation, that occurs automatically
as well, but you need to check Page.IsValid (or if specific validator then
it's IsValid) before critical code that relies on the validation runs. In
this case in the postback event, before any other code runs, check
Page.IsValid and if it's True then let the code run.

There are also so called DOM-compliant validation controls out there that do
the validation on client-side for every DOM-compliant browser.. If you
absolutely need such functionality, look for such controls.

--
Teemu Keiski
MCP,Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com

Email:
jo****@aspalliance.com

"Rick" <ri********@hotmail.com> kirjoitti viestissä
news:01****************************@phx.gbl...
I have an interesting problem when I run the following
code in Netscape (7.02) vs. IE. This page works great in
IE and all my controls bring up the validation summary
dialog box if the required field is not filled out.
However in Netscape NONE of the required field
validations occurs at all in Netscape. The form is
posting correctly because I can walk through the post
back process. Any ideas why this is happening or how to
fix it?

Thanks in advance...

Here is the page:
<%@ Page Language="vb" SmartNavigation="false"
AutoEventWireup="false" Codebehind="SignUpToday2.aspx.vb"
Inherits="PCBC.SignUpToday2" EnableViewState="True"%>
<%@ Register TagPrefix="Navigation" TagName="Bottom"
Src="..\bottom.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Left"
Src="..\left.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Top"
Src="..\top.ascx" %>
<%@ OutputCache Duration="60" VaryByParam="*"
VaryByCustom="browser" %>
<HTML>
<HEAD>
<title>SIGN UP TODAY</title>

<form id="Form1" method="post"
runat="server">
<!--start entire page
table with 3 rows -->
<table height="100%"
cellSpacing="0" cellPadding="0" width="100%"
align="center" border="0">
<tr>
<!--start
Top Nav -->
<td
vAlign="top" align="left"
bgColor="#000000"><NAVIGATION:TOP id="Top" runat="server"
NAME="Top"></NAVIGATION:TOP></td>
<!--end
Top Nav --></tr>
<tr>
<td
vAlign="top" align="left" bgColor="#000000" height="100%">

<!--start main table with 2 columns -->

<table cellSpacing="0" cellPadding="0"
width="100%" border="0">

<tr>

<!--start Left Nav table with 3 rows -->

<!--<td bgcolor="#000000" align="left"
valign="top" width="108">

<!-- <Navigation:Left runat="server"
ID="Left" NAME="Left"></Navigation:Left>

<!--</td>-->

<td bgColor="#000000">

<!--------------------------------
-------->

<table cellSpacing="0"
cellPadding="0" width="100%" align="center" border="0">

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>

</b></font>

</td>

</tr>

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>


</b></font>

</td>

</tr>

<tr>

<td vAlign="top"
align="center" width="74%" bgColor="#000000" height="281">

<table
height="227" cellSpacing="0" cellPadding="0" width="95%"
align="center" border="0">
<tr>
<td width="24"
background="../images/frame_top_left.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="736"
background="../images/frame_top_mid.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="29"
background="../images/frame_top_right.jpg"
bgColor="#000000" height="15">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_left.jpg" bgColor="#000000"
height="210">&nbsp;</td>
<td vAlign="middle" align="center" width="736"
bgColor="#000000" height="210">
<table cellSpacing="0" cellPadding="0"
width="100%" border="0">
<tr>
<td bgColor="#000000"
colSpan="2">Please enter your contact information below.
All
fields with an
asterisk (*) next to them are required.<BR>
<FONT
color="red">You must be at least 18 years old to become a
member of

PCBootyCall.</FONT>
<br>
<br>

<asp:validationsummary id="ValidationSummary1"
runat="server" ShowMessageBox="True" HeaderText="<b>The
following errors were detected:</b>"

Height="24px" Width="430px"
ShowSummary="False"></asp:validationsummary></td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="27">Email Address:
</td>
<td bgColor="#000000"
height="27"><asp:textbox id="txtEmailAddress"
Height="20px" Columns="45" Width="231px" MaxLength="50"
Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator1" runat="server"
ControlToValidate="txtEmailAddress"

ErrorMessage="Email Address must be entered.">
*</asp:requiredfieldvalidator><asp:comparevalidato
r id="CompareValidator1" runat="server"
ControlToValidate="txtEmailAddress2" ErrorMessage="Email
Addresses must match."

ControlToCompare="txtEmailAddress"
Display="Dynamic">*</asp:comparevalidator><asp:regularexpr
essionvalidator id="RegularExpressionValidator1"
runat="server" ControlToValidate="txtEmailAddress"

ErrorMessage="Invalid Email Address"
Display="Dynamic" ValidationExpression="\w+([-+.]\w+)*@\w+
([-.]\w+)*\.\w+([-.]\w+)
*">*</asp:regularexpressionvalidator><br>
<FONT
color="red">Note: In order to complete the sign up
process, we will need to
send a
confirmation message to the email address you enter
above.</FONT> Be
sure to include
your "@serviceprovider.com" domain.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="24">Confirm Email
Address:
</td>
<td width="297"
bgColor="#000000" height="24"><asp:textbox
id="txtEmailAddress2" Height="20px" Columns="45"
Width="231px" MaxLength="50" Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator2" runat="server"
ControlToValidate="txtEmailAddress2"

ErrorMessage="Confirm Email Address must be
entered"
Display="Dynamic">*</asp:requiredfieldvalidator><br>
Please re-enter
your email address.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000">Name:
</td>
<td width="297"
bgColor="#000000"><asp:textbox id="txtFirstName"
Height="20px" Width="99px" MaxLength="15" Runat="server"
ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator3" runat="server"
ControlToValidate="txtFirstName" ErrorMessage="First Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><a
sp:textbox id="txtLastName" Height="20px" Width="124px"
MaxLength="25" Runat="server" ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator4" runat="server"
ControlToValidate="txtLastName" ErrorMessage="Last Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><b
r>
First

Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Last Name
</td>
</tr>


<tr>
<td width="161"
bgColor="#000000">&nbsp;
</td>
<td width="297"
bgColor="#000000"><br>
<asp:imagebutton
id="imgbtnContinue" runat="server"
ImageUrl="../Images/button_continue.jpg"></asp:imagebutton
</td>

</tr>
<TR>
<td bgColor="#000000"
colSpan="2"><br>
<FONT
color="red"><B>Note to AOL and CompuServe Members:</B><BR>
Make sure
your Mail Controls are set to receive emails from

www.pcbootycall.com. If you have Internet email
blocked, you will need to
update
your Mail Controls. To make this update, enter the
Keyword "Mail
Controls"
on AOL or CompuServe</FONT>
</td>
</TR>
</table>
</td>
<td width="29"
background="../images/frame_right.jpg" bgColor="#000000"
height="210">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_bottom_left.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="736"
background="../images/frame_bottom_mid.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="29"
background="../images/frame_bottom_right.jpg"
bgColor="#000000" height="2">&nbsp;</td>
</tr>

</table>

</td>

</tr>

</table>

<!--------------------------------
--------></td>

</tr>

</table>
</td>
<tr>
<!--start
Bottom Footer -->
<td
vAlign="top" align="left" width="100%"
bgColor="#000000"><NAVIGATION:BOTTOM id="Bottom"
runat="server" NAME="Botttom"></NAVIGATION:BOTTOM></td>
<!--end
Bottom Footer --></tr>
</table>
</form>
</font>
</body>
</HTML>

Nov 17 '05 #2

P: n/a
Validate using IsValid() on the Server side. You should always do this, even
when client side is working, as one common hack attack is to create your own
form to by pass client side validation.

Not sure on NetScape 7.0. I know many browsers do not support client side
validation in .NET. NS has done some strange garbage with the 7.x version of
their browser, which breaks a lot of code.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"Rick" <ri********@hotmail.com> wrote in message
news:01****************************@phx.gbl...
I have an interesting problem when I run the following
code in Netscape (7.02) vs. IE. This page works great in
IE and all my controls bring up the validation summary
dialog box if the required field is not filled out.
However in Netscape NONE of the required field
validations occurs at all in Netscape. The form is
posting correctly because I can walk through the post
back process. Any ideas why this is happening or how to
fix it?

Thanks in advance...

Here is the page:
<%@ Page Language="vb" SmartNavigation="false"
AutoEventWireup="false" Codebehind="SignUpToday2.aspx.vb"
Inherits="PCBC.SignUpToday2" EnableViewState="True"%>
<%@ Register TagPrefix="Navigation" TagName="Bottom"
Src="..\bottom.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Left"
Src="..\left.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Top"
Src="..\top.ascx" %>
<%@ OutputCache Duration="60" VaryByParam="*"
VaryByCustom="browser" %>
<HTML>
<HEAD>
<title>SIGN UP TODAY</title>

<form id="Form1" method="post"
runat="server">
<!--start entire page
table with 3 rows -->
<table height="100%"
cellSpacing="0" cellPadding="0" width="100%"
align="center" border="0">
<tr>
<!--start
Top Nav -->
<td
vAlign="top" align="left"
bgColor="#000000"><NAVIGATION:TOP id="Top" runat="server"
NAME="Top"></NAVIGATION:TOP></td>
<!--end
Top Nav --></tr>
<tr>
<td
vAlign="top" align="left" bgColor="#000000" height="100%">

<!--start main table with 2 columns -->

<table cellSpacing="0" cellPadding="0"
width="100%" border="0">

<tr>

<!--start Left Nav table with 3 rows -->

<!--<td bgcolor="#000000" align="left"
valign="top" width="108">

<!-- <Navigation:Left runat="server"
ID="Left" NAME="Left"></Navigation:Left>

<!--</td>-->

<td bgColor="#000000">

<!--------------------------------
-------->

<table cellSpacing="0"
cellPadding="0" width="100%" align="center" border="0">

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>

</b></font>

</td>

</tr>

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>


</b></font>

</td>

</tr>

<tr>

<td vAlign="top"
align="center" width="74%" bgColor="#000000" height="281">

<table
height="227" cellSpacing="0" cellPadding="0" width="95%"
align="center" border="0">
<tr>
<td width="24"
background="../images/frame_top_left.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="736"
background="../images/frame_top_mid.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="29"
background="../images/frame_top_right.jpg"
bgColor="#000000" height="15">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_left.jpg" bgColor="#000000"
height="210">&nbsp;</td>
<td vAlign="middle" align="center" width="736"
bgColor="#000000" height="210">
<table cellSpacing="0" cellPadding="0"
width="100%" border="0">
<tr>
<td bgColor="#000000"
colSpan="2">Please enter your contact information below.
All
fields with an
asterisk (*) next to them are required.<BR>
<FONT
color="red">You must be at least 18 years old to become a
member of

PCBootyCall.</FONT>
<br>
<br>

<asp:validationsummary id="ValidationSummary1"
runat="server" ShowMessageBox="True" HeaderText="<b>The
following errors were detected:</b>"

Height="24px" Width="430px"
ShowSummary="False"></asp:validationsummary></td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="27">Email Address:
</td>
<td bgColor="#000000"
height="27"><asp:textbox id="txtEmailAddress"
Height="20px" Columns="45" Width="231px" MaxLength="50"
Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator1" runat="server"
ControlToValidate="txtEmailAddress"

ErrorMessage="Email Address must be entered.">
*</asp:requiredfieldvalidator><asp:comparevalidato
r id="CompareValidator1" runat="server"
ControlToValidate="txtEmailAddress2" ErrorMessage="Email
Addresses must match."

ControlToCompare="txtEmailAddress"
Display="Dynamic">*</asp:comparevalidator><asp:regularexpr
essionvalidator id="RegularExpressionValidator1"
runat="server" ControlToValidate="txtEmailAddress"

ErrorMessage="Invalid Email Address"
Display="Dynamic" ValidationExpression="\w+([-+.]\w+)*@\w+
([-.]\w+)*\.\w+([-.]\w+)
*">*</asp:regularexpressionvalidator><br>
<FONT
color="red">Note: In order to complete the sign up
process, we will need to
send a
confirmation message to the email address you enter
above.</FONT> Be
sure to include
your "@serviceprovider.com" domain.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="24">Confirm Email
Address:
</td>
<td width="297"
bgColor="#000000" height="24"><asp:textbox
id="txtEmailAddress2" Height="20px" Columns="45"
Width="231px" MaxLength="50" Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator2" runat="server"
ControlToValidate="txtEmailAddress2"

ErrorMessage="Confirm Email Address must be
entered"
Display="Dynamic">*</asp:requiredfieldvalidator><br>
Please re-enter
your email address.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000">Name:
</td>
<td width="297"
bgColor="#000000"><asp:textbox id="txtFirstName"
Height="20px" Width="99px" MaxLength="15" Runat="server"
ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator3" runat="server"
ControlToValidate="txtFirstName" ErrorMessage="First Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><a
sp:textbox id="txtLastName" Height="20px" Width="124px"
MaxLength="25" Runat="server" ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator4" runat="server"
ControlToValidate="txtLastName" ErrorMessage="Last Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><b
r>
First

Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Last Name
</td>
</tr>


<tr>
<td width="161"
bgColor="#000000">&nbsp;
</td>
<td width="297"
bgColor="#000000"><br>
<asp:imagebutton
id="imgbtnContinue" runat="server"
ImageUrl="../Images/button_continue.jpg"></asp:imagebutton
</td>

</tr>
<TR>
<td bgColor="#000000"
colSpan="2"><br>
<FONT
color="red"><B>Note to AOL and CompuServe Members:</B><BR>
Make sure
your Mail Controls are set to receive emails from

www.pcbootycall.com. If you have Internet email
blocked, you will need to
update
your Mail Controls. To make this update, enter the
Keyword "Mail
Controls"
on AOL or CompuServe</FONT>
</td>
</TR>
</table>
</td>
<td width="29"
background="../images/frame_right.jpg" bgColor="#000000"
height="210">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_bottom_left.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="736"
background="../images/frame_bottom_mid.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="29"
background="../images/frame_bottom_right.jpg"
bgColor="#000000" height="2">&nbsp;</td>
</tr>

</table>

</td>

</tr>

</table>

<!--------------------------------
--------></td>

</tr>

</table>
</td>
<tr>
<!--start
Bottom Footer -->
<td
vAlign="top" align="left" width="100%"
bgColor="#000000"><NAVIGATION:BOTTOM id="Bottom"
runat="server" NAME="Botttom"></NAVIGATION:BOTTOM></td>
<!--end
Bottom Footer --></tr>
</table>
</form>
</font>
</body>
</HTML>

Nov 17 '05 #3

P: n/a
The responses by Teemu and Cowboy never mentioned calling Page.Validate()
before checking Page.IsValid. I had thought that you needed to always call
Validate() before IsValid on the server side, but in re-reading the docs, it
does not appear that way, but can you explain when/what situations
Validate() is required to be called?

Thanks,
Chris

"Cowboy (Gregory A. Beamer)" <No************@comcast.netRemuvThis> wrote in
message news:uJ**************@tk2msftngp13.phx.gbl...
Validate using IsValid() on the Server side. You should always do this, even when client side is working, as one common hack attack is to create your own form to by pass client side validation.

Not sure on NetScape 7.0. I know many browsers do not support client side
validation in .NET. NS has done some strange garbage with the 7.x version of their browser, which breaks a lot of code.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** ************************** ****
Think Outside the Box!
************************************************** ************************** ****
"Rick" <ri********@hotmail.com> wrote in message
news:01****************************@phx.gbl...
I have an interesting problem when I run the following
code in Netscape (7.02) vs. IE. This page works great in
IE and all my controls bring up the validation summary
dialog box if the required field is not filled out.
However in Netscape NONE of the required field
validations occurs at all in Netscape. The form is
posting correctly because I can walk through the post
back process. Any ideas why this is happening or how to
fix it?

Thanks in advance...

Here is the page:
<%@ Page Language="vb" SmartNavigation="false"
AutoEventWireup="false" Codebehind="SignUpToday2.aspx.vb"
Inherits="PCBC.SignUpToday2" EnableViewState="True"%>
<%@ Register TagPrefix="Navigation" TagName="Bottom"
Src="..\bottom.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Left"
Src="..\left.ascx" %>
<%@ Register TagPrefix="Navigation" TagName="Top"
Src="..\top.ascx" %>
<%@ OutputCache Duration="60" VaryByParam="*"
VaryByCustom="browser" %>
<HTML>
<HEAD>
<title>SIGN UP TODAY</title>

<form id="Form1" method="post"
runat="server">
<!--start entire page
table with 3 rows -->
<table height="100%"
cellSpacing="0" cellPadding="0" width="100%"
align="center" border="0">
<tr>
<!--start
Top Nav -->
<td
vAlign="top" align="left"
bgColor="#000000"><NAVIGATION:TOP id="Top" runat="server"
NAME="Top"></NAVIGATION:TOP></td>
<!--end
Top Nav --></tr>
<tr>
<td
vAlign="top" align="left" bgColor="#000000" height="100%">

<!--start main table with 2 columns -->

<table cellSpacing="0" cellPadding="0"
width="100%" border="0">

<tr>

<!--start Left Nav table with 3 rows -->

<!--<td bgcolor="#000000" align="left"
valign="top" width="108">

<!-- <Navigation:Left runat="server"
ID="Left" NAME="Left"></Navigation:Left>

<!--</td>-->

<td bgColor="#000000">

<!--------------------------------
-------->

<table cellSpacing="0"
cellPadding="0" width="100%" align="center" border="0">

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>

</b></font>

</td>

</tr>

<tr vAlign="top"
align="left">

<td
bgColor="#000000" height="18"><font face="Tahoma"
size="3"><b>


</b></font>

</td>

</tr>

<tr>

<td vAlign="top"
align="center" width="74%" bgColor="#000000" height="281">

<table
height="227" cellSpacing="0" cellPadding="0" width="95%"
align="center" border="0">
<tr>
<td width="24"
background="../images/frame_top_left.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="736"
background="../images/frame_top_mid.jpg"
bgColor="#000000" height="15">&nbsp;</td>
<td width="29"
background="../images/frame_top_right.jpg"
bgColor="#000000" height="15">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_left.jpg" bgColor="#000000"
height="210">&nbsp;</td>
<td vAlign="middle" align="center" width="736"
bgColor="#000000" height="210">
<table cellSpacing="0" cellPadding="0"
width="100%" border="0">
<tr>
<td bgColor="#000000"
colSpan="2">Please enter your contact information below.
All
fields with an
asterisk (*) next to them are required.<BR>
<FONT
color="red">You must be at least 18 years old to become a
member of

PCBootyCall.</FONT>
<br>
<br>

<asp:validationsummary id="ValidationSummary1"
runat="server" ShowMessageBox="True" HeaderText="<b>The
following errors were detected:</b>"

Height="24px" Width="430px"
ShowSummary="False"></asp:validationsummary></td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="27">Email Address:
</td>
<td bgColor="#000000"
height="27"><asp:textbox id="txtEmailAddress"
Height="20px" Columns="45" Width="231px" MaxLength="50"
Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator1" runat="server"
ControlToValidate="txtEmailAddress"

ErrorMessage="Email Address must be entered.">
*</asp:requiredfieldvalidator><asp:comparevalidato
r id="CompareValidator1" runat="server"
ControlToValidate="txtEmailAddress2" ErrorMessage="Email
Addresses must match."

ControlToCompare="txtEmailAddress"
Display="Dynamic">*</asp:comparevalidator><asp:regularexpr
essionvalidator id="RegularExpressionValidator1"
runat="server" ControlToValidate="txtEmailAddress"

ErrorMessage="Invalid Email Address"
Display="Dynamic" ValidationExpression="\w+([-+.]\w+)*@\w+
([-.]\w+)*\.\w+([-.]\w+)
*">*</asp:regularexpressionvalidator><br>
<FONT
color="red">Note: In order to complete the sign up
process, we will need to
send a
confirmation message to the email address you enter
above.</FONT> Be
sure to include
your "@serviceprovider.com" domain.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000" height="24">Confirm Email
Address:
</td>
<td width="297"
bgColor="#000000" height="24"><asp:textbox
id="txtEmailAddress2" Height="20px" Columns="45"
Width="231px" MaxLength="50" Runat="server"

ForeColor="Black"
BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator2" runat="server"
ControlToValidate="txtEmailAddress2"

ErrorMessage="Confirm Email Address must be
entered"
Display="Dynamic">*</asp:requiredfieldvalidator><br>
Please re-enter
your email address.
</td>
</tr>
<tr>
<td vAlign="top"
width="161" bgColor="#000000">Name:
</td>
<td width="297"
bgColor="#000000"><asp:textbox id="txtFirstName"
Height="20px" Width="99px" MaxLength="15" Runat="server"
ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator3" runat="server"
ControlToValidate="txtFirstName" ErrorMessage="First Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><a
sp:textbox id="txtLastName" Height="20px" Width="124px"
MaxLength="25" Runat="server" ForeColor="Black"

BackColor="White"></asp:textbox>*

<asp:requiredfieldvalidator
id="RequiredFieldValidator4" runat="server"
ControlToValidate="txtLastName" ErrorMessage="Last Name
must be entered."

Display="Dynamic">*</asp:requiredfieldvalidator><b
r>
First

Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Last Name
</td>
</tr>


<tr>
<td width="161"
bgColor="#000000">&nbsp;
</td>
<td width="297"
bgColor="#000000"><br>
<asp:imagebutton
id="imgbtnContinue" runat="server"
ImageUrl="../Images/button_continue.jpg"></asp:imagebutton
</td>

</tr>
<TR>
<td bgColor="#000000"
colSpan="2"><br>
<FONT
color="red"><B>Note to AOL and CompuServe Members:</B><BR>
Make sure
your Mail Controls are set to receive emails from

www.pcbootycall.com. If you have Internet email
blocked, you will need to
update
your Mail Controls. To make this update, enter the
Keyword "Mail
Controls"
on AOL or CompuServe</FONT>
</td>
</TR>
</table>
</td>
<td width="29"
background="../images/frame_right.jpg" bgColor="#000000"
height="210">&nbsp;</td>
</tr>
<tr>
<td width="24"
background="../images/frame_bottom_left.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="736"
background="../images/frame_bottom_mid.jpg"
bgColor="#000000" height="2">&nbsp;</td>
<td width="29"
background="../images/frame_bottom_right.jpg"
bgColor="#000000" height="2">&nbsp;</td>
</tr>

</table>

</td>

</tr>

</table>

<!--------------------------------
--------></td>

</tr>

</table>
</td>
<tr>
<!--start
Bottom Footer -->
<td
vAlign="top" align="left" width="100%"
bgColor="#000000"><NAVIGATION:BOTTOM id="Bottom"
runat="server" NAME="Botttom"></NAVIGATION:BOTTOM></td>
<!--end
Bottom Footer --></tr>
</table>
</form>
</font>
</body>
</HTML>


Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.