ASP.NET Validation controls and Firefox/Netscape 7.1

Discussion in 'ASP .Net' started by =?Utf-8?B?bXN1aw==?=, Dec 3, 2004.

  1. All,

    I have a ASP.NET/C# webform thats contains some validation controls. When I
    view this page in IE the control work fine and validates the user's input.

    When I view the same page in firefox 1.0 or Netscape the validation controls
    do not work at all and an exception is display.

    How can I make the validation controls work in Firefox/Netscape 7.1?

    Thanks
    Msuk
     
    =?Utf-8?B?bXN1aw==?=, Dec 3, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?bXN1aw==?=

    Karl Seguin Guest

    The ASP.Net validations only work client side in IE. You can make them work
    server side in other browsers, via something like:

    Sub SomeButton_Click(...)
    Page.Validate()
    If Page.IsValid Then
    ... normal stuff here
    end if
    end sub

    Or, you can use 3rd party controls which do work in Netscape, such as Paul
    Glavich's great DOMValidators (free)
    http://aspalliance.com/glav/downloads/domvalidators.zip

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "msuk" <> wrote in message
    news:...
    > All,
    >
    > I have a ASP.NET/C# webform thats contains some validation controls. When

    I
    > view this page in IE the control work fine and validates the user's input.
    >
    > When I view the same page in firefox 1.0 or Netscape the validation

    controls
    > do not work at all and an exception is display.
    >
    > How can I make the validation controls work in Firefox/Netscape 7.1?
    >
    > Thanks
    > Msuk
     
    Karl Seguin, Dec 3, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?bXN1aw==?=

    John M Deal Guest

    I have a theory on this that I haven't been able to test out yet where I
    think it may be related to browsercaps. Browser caps is where the
    ASP.Net server thinks that it is dealing with a browser that has the
    full capabilities of a newer browser vs the limited capabilities of an
    older browser. The reason I think this might be the case is because I
    have found that in FireFox the page's form's onSubmit attribute is not
    set to cancel the submit if the page isn't valid, IE has this attribute
    set so it would seem that at least that part may have something to do
    with browser caps settings.

    The only way to find out would be to try and see if modifying the
    browser caps settings will work. Like I said this is only a theory of
    mine at this point and I don't have the time right now to test it out.
    Here's a link to a site that has some additional information on this.
    Hope it helps.

    http://weblogs.asp.net/mrupp/archive/2003/04/03/4789.aspx

    Have A Better One!

    John M Deal, MCP
    Necessity Software

    P.S. One of these days I'll actually test this out and either prove or
    disprove this theory. If you try it out please post your results.

    msuk wrote:
    > All,
    >
    > I have a ASP.NET/C# webform thats contains some validation controls. When I
    > view this page in IE the control work fine and validates the user's input.
    >
    > When I view the same page in firefox 1.0 or Netscape the validation controls
    > do not work at all and an exception is display.
    >
    > How can I make the validation controls work in Firefox/Netscape 7.1?
    >
    > Thanks
    > Msuk
     
    John M Deal, Dec 3, 2004
    #3
  4. =?Utf-8?B?bXN1aw==?=

    Peter Blum Guest

    Hi John,

    Why do the test when the answer of why FireFox doesn't work is well known?
    Microsoft wrote their scripts in DHTML. Specifically, they use
    document.all[] instead of document.getElementById() to access the <span>
    tags that represent the validators.

    This article discusses it in detail:
    http://aspnet.4guysfromrolla.com/articles/051204-1.aspx

    Another third party solution is "Professional Validation And More"
    (http://www.peterblum.com/vam/home.aspx). Its 22 validators provide
    client-side validation on IE, IE/Mac, Netscape 7, Mozilla, FireFox, Opera 7
    and Safari.

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

    "John M Deal" <> wrote in message
    news:...
    >I have a theory on this that I haven't been able to test out yet where I
    >think it may be related to browsercaps. Browser caps is where the ASP.Net
    >server thinks that it is dealing with a browser that has the full
    >capabilities of a newer browser vs the limited capabilities of an older
    >browser. The reason I think this might be the case is because I have found
    >that in FireFox the page's form's onSubmit attribute is not set to cancel
    >the submit if the page isn't valid, IE has this attribute set so it would
    >seem that at least that part may have something to do with browser caps
    >settings.
    >
    > The only way to find out would be to try and see if modifying the browser
    > caps settings will work. Like I said this is only a theory of mine at this
    > point and I don't have the time right now to test it out. Here's a link to
    > a site that has some additional information on this. Hope it helps.
    >
    > http://weblogs.asp.net/mrupp/archive/2003/04/03/4789.aspx
    >
    > Have A Better One!
    >
    > John M Deal, MCP
    > Necessity Software
    >
    > P.S. One of these days I'll actually test this out and either prove or
    > disprove this theory. If you try it out please post your results.
    >
    > msuk wrote:
    >> All,
    >>
    >> I have a ASP.NET/C# webform thats contains some validation controls.
    >> When I view this page in IE the control work fine and validates the
    >> user's input.
    >>
    >> When I view the same page in firefox 1.0 or Netscape the validation
    >> controls do not work at all and an exception is display. How can I make
    >> the validation controls work in Firefox/Netscape 7.1?
    >>
    >> Thanks
    >> Msuk
     
    Peter Blum, Dec 3, 2004
    #4
  5. =?Utf-8?B?bXN1aw==?=

    John M Deal Guest

    Thanks for the info. The reason I wanted to test it out was that I
    wasn't aware that it was a well known issue, and once I find out about a
    problem I like to know the answer to see if I can fix it. With over
    three years of professional .Net (primarily ASP.Net) experience I'm not
    a newbie, I just never dug into it as it hasn't been relevant to the
    projects I've been working on (mostly intranet applications) and I
    always use both server and client side validations as it is way too easy
    to bypass a web based interface.

    Thanks for the links, I'll have to read up on this more. Also I'll keep
    it in mind if someone asks again (there were actually two different
    people asking on this newsgroup in the last couple of days alone).
    Thanks again.

    Have A Better One!

    John M Deal, MCP
    Necessity Software

    P.S. Pretty sweet way to plug your own product. I'll have to remember
    that when ours comes out (I keep forgetting it is perfectly legit when
    it applies to the question being asked).

    Peter Blum wrote:
    > Hi John,
    >
    > Why do the test when the answer of why FireFox doesn't work is well known?
    > Microsoft wrote their scripts in DHTML. Specifically, they use
    > document.all[] instead of document.getElementById() to access the <span>
    > tags that represent the validators.
    >
    > This article discusses it in detail:
    > http://aspnet.4guysfromrolla.com/articles/051204-1.aspx
    >
    > Another third party solution is "Professional Validation And More"
    > (http://www.peterblum.com/vam/home.aspx). Its 22 validators provide
    > client-side validation on IE, IE/Mac, Netscape 7, Mozilla, FireFox, Opera 7
    > and Safari.
    >
    > --- Peter Blum
    > www.PeterBlum.com
    > Email:
    > Creator of "Professional Validation And More" at
    > http://www.peterblum.com/vam/home.aspx
    >
    > "John M Deal" <> wrote in message
    > news:...
    >
    >>I have a theory on this that I haven't been able to test out yet where I
    >>think it may be related to browsercaps. Browser caps is where the ASP.Net
    >>server thinks that it is dealing with a browser that has the full
    >>capabilities of a newer browser vs the limited capabilities of an older
    >>browser. The reason I think this might be the case is because I have found
    >>that in FireFox the page's form's onSubmit attribute is not set to cancel
    >>the submit if the page isn't valid, IE has this attribute set so it would
    >>seem that at least that part may have something to do with browser caps
    >>settings.
    >>
    >>The only way to find out would be to try and see if modifying the browser
    >>caps settings will work. Like I said this is only a theory of mine at this
    >>point and I don't have the time right now to test it out. Here's a link to
    >>a site that has some additional information on this. Hope it helps.
    >>
    >>http://weblogs.asp.net/mrupp/archive/2003/04/03/4789.aspx
    >>
    >>Have A Better One!
    >>
    >>John M Deal, MCP
    >>Necessity Software
    >>
    >>P.S. One of these days I'll actually test this out and either prove or
    >>disprove this theory. If you try it out please post your results.
    >>
    >>msuk wrote:
    >>
    >>>All,
    >>>
    >>>I have a ASP.NET/C# webform thats contains some validation controls.
    >>>When I view this page in IE the control work fine and validates the
    >>>user's input.
    >>>
    >>>When I view the same page in firefox 1.0 or Netscape the validation
    >>>controls do not work at all and an exception is display. How can I make
    >>>the validation controls work in Firefox/Netscape 7.1?
    >>>
    >>>Thanks
    >>>Msuk

    >
    >
    >
     
    John M Deal, Dec 3, 2004
    #5
    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. Mike George

    Dynamic Validation Controls in Netscape

    Mike George, Jun 25, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    897
    Netscape
    Jun 25, 2003
  2. Srinivasa Raghavan

    ASP.Net Validation controls not working in netscape

    Srinivasa Raghavan, Jul 29, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    461
    S. Justin Gengo
    Jul 29, 2003
  3. Srinivasa Raghavan Sethuraman

    Re: ASP.Net Validation controls not working in netscape

    Srinivasa Raghavan Sethuraman, Jul 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    374
    Srinivasa Raghavan Sethuraman
    Jul 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,169
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. raagz
    Replies:
    5
    Views:
    412
    Peter Blum
    Apr 17, 2004
Loading...

Share This Page