How can I use server side validation that asks the user a question?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndrewK
    New Member
    • Dec 2008
    • 16

    How can I use server side validation that asks the user a question?

    I'm trying to use validation (probably utilising the CustomValidator in ASP.NET 2.0) that checks whether a user entered order id already exists in a database, then, if it does exist, display a prompt for the user to ask whether they want to overwrite the order or enter a different order number.
    I'm not sure how to do this. I know I can use client side validation for the user prompt, and server side validation to check the order number against the database, but I'm not sure how to put the two things together i.e. check the database then, if the order exists, ask the user whether they want to overwrite the current order or go back and enter a new order id.
    Has anyone done this sort of thing before?
  • NitinSawant
    Contributor
    • Oct 2007
    • 271

    #2
    yes,
    Create a user control, put all things together

    goto design mode and just drag the control on the page



    Regards,
    Nitin

    Comment

    • AndrewK
      New Member
      • Dec 2008
      • 16

      #3
      Thanks for your response NitinSawant.
      Would I be able to display a prompt to the user though, only if the order id already exists, asking them whether they want to keep the current order id that they've entered or enter another one?

      Comment

      • NitinSawant
        Contributor
        • Oct 2007
        • 271

        #4
        yes,

        you can display alert box/prompt using javascript

        Comment

        • AndrewK
          New Member
          • Dec 2008
          • 16

          #5
          Okay, thanks very much for taking the time to respond. I'll give it some thought.

          Comment

          Working...