Microsoft Validation controls

Discussion in 'ASP.NET / ASP.NET Core' started by Ness, Jan 3, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello,
    Happy New Year?
    I have completed my first ASP.net Data Driven Form. It works great. I use many of the Microsoft Validation controls.
    However, I tested my application on FireFox and none of the validation controls work. Will ASP2.net resolve this? What can I do?

    Gene
     
  2. Hello Everyone,
    </o:p>
    I have solved my ASP.Net 2.0 Validation Controls problem in which I added code so that a non-Internet Explorer browser, like FireFox, will be able to handle the standard ASP.net validation controls.

    Thanks for your comments...
    Gene
     
  3. As a follow up... here's the code I used to get FireFox to accept all the standard asp.net validation controls..


    good luck,


    gene





    '#1 note: insert at the beginning of the code
    Sub Page_Load(Sender,E)
    If Not IsPostBack
    'Validate intially to force *s to appear before the first round-trip
    Validate()
    End If
    End Sub


    '#2 note: added the "onchange" in my first textbox
    <asp:TextBox id="txtfirstname" runat="server" MaxLength="15" onchange="ClientOnChange():"></asp:TextBox>


    '#3note: added this code at the end of the program.
    </form>
    <script language="javascript">
    <!--
    function ClientOnChange() {
    if (typeof(Page_Validators) == "undefined")
    return;
    document.all["lblOutput"].innerText = Page_IsValid ? "Page is Valid!" : "Some of the required fields are empty";
    }
    // -->
    </script>
     
  4. In the MSDN docs, it covers how to create DOM validators, that work in all browsers. It really isnt to hard, I did it, and added the capability to MD5 hash any field upon validation, so my passwords are not sent in clear text.

    Just search on CustomValidator Control Sample in MSDN...
     
  5. Bruce

    Bruce DiscountASP.NET Staff

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page