Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

ASP.NET page runs differently in certain Browser (IE / Firefox (mozilla) )

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bienwell - 19 Oct 2007 15:24 GMT
Hi all,

I have a problem with the program in ASP.NET.  I have a web page that let
users change their passwords with a regularexpressionvalidator that
validates against the new password  (8 characters or more) as below.  The
page works fine with IE browser. When a user enter a new password that does
not match with this rule (for example "a", he will receive an error
"Invalid password!" from client side. On the contrary, when user uses
Firefox (mozilla) browser, he tried to enter one character "a" ; the page
accepted this data without displaying an error message ="Invalid password!"
from regularexpressionvalidator and saved that password into the table.

What's wrong with this ?  What should I do to make the page work properly
with any browser ?  Please help!
Thanks in advance.

<td class="dataTD" style="FONT-SIZE: 10pt; WIDTH: 185px"><asp:label
id="LblNew" runat="server" Width="123px">New

Password :</asp:label><label for="NewPassword"></label></td>

<td class="dataTD" style="FONT-SIZE: 10pt"><asp:textbox id="NewPassword"
runat="server" Width="145px" TextMode="Password"></asp:textbox>&nbsp;&nbsp;

<asp:regularexpressionvalidator id="RegularExpressionValidator1"
runat="server" ForeColor="LightCoral" ErrorMessage="Invalid password!"

Display="Dynamic"
ValidationExpression="(?!^[0-9A-Z\W]*$)(?!^[a-zA-Z\W]*$)(?!^[a-z0-9\W]*$)(?!^[0-9a-zA-Z]*$)^([a-zA-Z0-9\W]{8,})$"

ControlToValidate="NewPassword"></asp:regularexpressionvalidator><asp:label
id="ErrNewPassword" runat="server" Width="281px"
ForeColor="LightCoral"></asp:label></td>

Firefox (mozilla) browser.
Mark Rae [MVP] - 19 Oct 2007 16:33 GMT
> What's wrong with this ?  What should I do to make the page work properly
> with any browser ?  Please help!

Generally speaking, when things work in IE but not in other browsers, it's
because of IE's lack of support for web standards and use of proprietary
functionality. IE7 is much improved in this respect, but earlier versions
(especially IE6) were terrible.

Judging by the markup, I'd say you're not validating your page for
XHTML-compliance. Specifically, you have upper-case style tags, which are
not permitted in XHTML...

Once you have sorted that out, it's a good idea to develop against FireFox
rather than IE...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

bienwell - 23 Oct 2007 14:09 GMT
How about the code I've sent to you. Do I need to fix anything to make it
work in any browsers?  I used the web controls in ASP.NET for the validation
in client side and it ignored this validation when using Firefox. If so, it
is the weak points of ASP.NET ?

>> What's wrong with this ?  What should I do to make the page work properly
>> with any browser ?  Please help!
[quoted text clipped - 10 lines]
> Once you have sorted that out, it's a good idea to develop against FireFox
> rather than IE...

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.