PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, November 21, 2022

[FIXED] How to Auto click the button after typing the ID number to textbox (Visual Studio C#)

 November 21, 2022     c#, sql, visual-studio     No comments   

Issue

i want to auto click the search button

Search button >>>

i want the button to auto click after entering the school ID of textbox


Solution

you should first determine how you want to detect the ID has entered. then you should add a handler to that event to call the search button click handler . for example if you want to do the search after user pressed the 'Enter' key, add a handler to 'KeyPress' envent of the School ID text box and call the search button's click event handler if the key is 'Enter' key:

      private void SchoolID_keypressed(object sender, KeyPressEventArgs e)
      {
         if (e.KeyChar == Convert.ToChar(Keys.Enter))
            Search_Click(sender, EventArgs.Empty);
      }

P.S.: I assumed you are developing WinForm application



Answered By - Behnam
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing