locked
Check in database value RRS feed

  • Question

  • User66371569 posted
    Hi people

    I have column in database called Qualification has 3 values:
    PHD
    Master
    Bachelor

    in my page i have textbox called qualification

    i want check in database for this user
    if he inserted Master save second time when he want to insert PHD Error shows "cant save PHD degree after Bachelor degree" How can i do that i want to force user to insert phd then master then bachelor but other than that show error if he try to insert big degree after small


    Hope you got it


    second bart i have 2 textboxs called from and to

    i want when user insert in to date before from error apears

    also i want to check in database if user insert in from same date or before date he insertd already error apears
    Saturday, January 19, 2019 3:50 PM

All replies

  • User61956409 posted

    Hi thepast,

    Firstly, you can use ADO.NET technologies to connect/query/operate your database.

    thepast

    if he inserted Master save second time when he want to insert PHD Error shows "cant save PHD degree after Bachelor degree" How can i do that i want to force user to insert phd then master then bachelor but other than that show error if he try to insert big degree after small

    You can achieve it from code behind and make use of the RegisterStartupScript method to show error message to client user.

    string script = "alert('cant save PHD degree after Bachelor degree');";
    ClientScript.RegisterStartupScript(this.GetType(), "showerrormes", script, true);

    thepast

    second bart i have 2 textboxs called from and to

    i want when user insert in to date before from error apears

    I suggest you can valid and check if user insert from textbox first on client side via JavaScript/jQuery,

    With Regards,

    Fei Han

    Monday, January 21, 2019 3:10 AM