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

Discussion in 'ASP .Net' started by bienwell, Oct 19, 2007.

  1. bienwell

    bienwell Guest

    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.
     
    bienwell, Oct 19, 2007
    #1
    1. Advertising

  2. "bienwell" <> wrote in message
    news:...

    > 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...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Oct 19, 2007
    #2
    1. Advertising

  3. bienwell

    bienwell Guest

    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 ?



    "Mark Rae [MVP]" <> wrote in message
    news:%...
    > "bienwell" <> wrote in message
    > news:...
    >
    >> 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...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    bienwell, Oct 23, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Honn
    Replies:
    3
    Views:
    3,288
    Teemu Keiski
    Apr 4, 2005
  2. tshad
    Replies:
    13
    Views:
    927
    Mark Parnell
    Mar 23, 2005
  3. beckj
    Replies:
    2
    Views:
    495
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Mar 5, 2006
  4. John Bullock
    Replies:
    4
    Views:
    155
    Grant Wagner
    Jul 8, 2004
  5. tshad
    Replies:
    1
    Views:
    119
Loading...

Share This Page