简体   繁体   中英

Checking a specific text field in ex. IE with an running windows application

I want to create an application that grabs a specific field (a text field in ex. IE) and searches for that word/name or whatever in that text field in a database. Is this possible?

Ex: Search word: Ford focus

The application grabs the search word automatically and then searches for the name in the database.

Do you want to do this ASP.Net and C#? If so:

1) Create a page on a new WebForm Project. Place a asp:textbox in the webpage and name it as txtSearch. 2) Add a asp:Button control and name it as btnSearch. 3) Using EntityFramework, create a datacontext that points to your database (do research how to create one) 4) double click on submit btnSearch in the designer. This should generate a default btnSearch_OnSubmit() event in the code behind. 5) using the datacontext retrieve your data, it would look something like: DataContext db = new DataContext(); var result = db.YourTable.Where(t => txtSearch.Text.Contains(t.Cars));

You should have your result in the result variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM