check data exist or not?
-
How to check that textbox data entered by the user exist on the db(MS Access) or not and if it exist in db than on the basis of that fetch the data and display on gridview else show error msg on label. Note:- Using VS-2013 Asp.net webform with c#
-
How to check that textbox data entered by the user exist on the db(MS Access) or not and if it exist in db than on the basis of that fetch the data and display on gridview else show error msg on label. Note:- Using VS-2013 Asp.net webform with c#
It is a pretty simple task, just get the data from your TextBox, search the database and if there is a record then show the data. Ok, let me talk to you in C#.
// Fetch the data
var val = textBox1.Text; // your TextBox// execute the SqlCommand; and get the value of reader (SqlDataReader) as bool for HasRows
if(hasRows) {
// perform function for data_exists
} else {
// nothing found in the database..
}You can then execute the function based on the data that was returned from the database. SqlDataReader on MSDN[^].
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
How to check that textbox data entered by the user exist on the db(MS Access) or not and if it exist in db than on the basis of that fetch the data and display on gridview else show error msg on label. Note:- Using VS-2013 Asp.net webform with c#
Build a "select" query that returns the data you're interested in, or define a query in the Access DB that does the select and call the query. If you get any rows back bind them to the gridview, otherwise show an error label. Is there something in particular you are stuck on? Is it reading user input? Using queries? Using the gridview? Conditionally showing messages?
-
How to check that textbox data entered by the user exist on the db(MS Access) or not and if it exist in db than on the basis of that fetch the data and display on gridview else show error msg on label. Note:- Using VS-2013 Asp.net webform with c#
If your really good at this, you use JQuery client side programming, and either bind a blur event to the textbox, or create a textbox with a blur event that links to a JQuery Function. Then write a JQuery Ajax request to a web service, in which the web service returns the data you need, and do something with the result. In the web service, you perform all your server side programming, but it happens in the background without a postback to the server, keeping the web app smooth in motion and fast in speed. Introduction to using jQuery with Web Services[^] Other wise, you have to postback the textbox data to the server, and fetch new stuff and repopulate the HTML or form (Gridview) When developing on a local machine, folks forget about speed, and long it takes. So consider form design for this, Is this an optimum time to check the data entered, and force the user to wait 10 seconds or so?