vb.net 2002 prompt once for text change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Momijisouma
    New Member
    • Dec 2007
    • 7

    #1

    vb.net 2002 prompt once for text change

    Hi ,

    I have 2 textbox , ID n Name. when i enter the ID , data will be pull from the database to populate the name.
    If i make changes to the name, i need to give a warnin message to the user but still let the user continue changing the name.

    On wat even handler should i try to catch the changes?
    how should i go about to complete my task ,

    Thank u in advane .
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    This article may be helpful:
    The ASP.NET Page Life Cycle
    Originally posted by Momijisouma
    Hi ,

    I have 2 textbox , ID n Name. when i enter the ID , data will be pull from the database to populate the name.
    If i make changes to the name, i need to give a warnin message to the user but still let the user continue changing the name.

    On wat even handler should i try to catch the changes?
    how should i go about to complete my task ,

    Thank u in advane .

    Comment

    • deric
      New Member
      • Dec 2007
      • 92

      #3
      Can you use JavaScript with the onChange event of the textbox?
      Like, for this example...
      Code:
      <script language="javascript">
      function func() {alert("value has been changed");}
      </script>
      ...
      <input type="text" onchange="javascript:func();">
      That code will send a message box after the user moves the focus from the textbox. If you want to give the message immediately after the user clicks inside the textbox, you may use onclick or onfocus.
      Refer here for more of the events. You can learn about javascript from that site, too.

      Comment

      • Momijisouma
        New Member
        • Dec 2007
        • 7

        #4
        sry sry , i forgot to mention , this is a window application ..

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by Momijisouma
          Hi ,

          I have 2 textbox , ID n Name. when i enter the ID , data will be pull from the database to populate the name.
          If i make changes to the name, i need to give a warnin message to the user but still let the user continue changing the name.

          On wat even handler should i try to catch the changes?
          how should i go about to complete my task ,

          Thank u in advane .
          Implement the method that handles the TextChanged Event for the name TextBox which will display the message....

          -Frinny

          Comment

          • Momijisouma
            New Member
            • Dec 2007
            • 7

            #6
            Thank you all ,

            yesh , i used the TextChanged Event and vairables to capture the data and i did it already ,

            Thank you

            Comment

            Working...