Connect to the database with Ajax via Asp.net
-
hey guys, I'm not good with Ajax, I am trying to connect to the database using ajax through asp.net. does anyone know how I can do this? please help :doh: Thanks guys
-
hey guys, I'm not good with Ajax, I am trying to connect to the database using ajax through asp.net. does anyone know how I can do this? please help :doh: Thanks guys
MorgSim wrote:
I'm not good with Ajax, I am trying to connect to the database using ajax through asp.net.
What do you mean by connecting DB through Ajax.Ajax is way to postback the page partially.So when you are at server side, you can can connect the DB as normally you do. Do you mean something else?
Cheers!! Brij
-
MorgSim wrote:
I'm not good with Ajax, I am trying to connect to the database using ajax through asp.net.
What do you mean by connecting DB through Ajax.Ajax is way to postback the page partially.So when you are at server side, you can can connect the DB as normally you do. Do you mean something else?
Cheers!! Brij
ok thanks, for instance, I want a user to enter a userid and upon doing that I want to connect to the database in the background to check if the id exist, if so, I will then insert the username for the user. The whole problem is connecting to the database as the user types which is why I think ajax would do the trick here even though am not sure how to implement this. Would you have any help please? Thanks,
-
hey guys, I'm not good with Ajax, I am trying to connect to the database using ajax through asp.net. does anyone know how I can do this? please help :doh: Thanks guys
Best would be to use XMLHttpRequest(old times AJAX! :) ) in order to implement such kind of feature... On keypress, fire a XHR and check on server about the typed in data(connecting to database) and get back response accordingly. if you need to know about it, just google it, you will get number of articles on it!
-
ok thanks, for instance, I want a user to enter a userid and upon doing that I want to connect to the database in the background to check if the id exist, if so, I will then insert the username for the user. The whole problem is connecting to the database as the user types which is why I think ajax would do the trick here even though am not sure how to implement this. Would you have any help please? Thanks,
For that you ealier verion of Ajax ie XMLHTTPRequest objects.You can get a lot on this in Codeproject itself. Have a look to a sample Click Here You can also use callback. There is a control provided in Ajaxtookit.Its very simple to use and might suffice your requirement. AutoComplete[^]
Cheers!! Brij
-
For that you ealier verion of Ajax ie XMLHTTPRequest objects.You can get a lot on this in Codeproject itself. Have a look to a sample Click Here You can also use callback. There is a control provided in Ajaxtookit.Its very simple to use and might suffice your requirement. AutoComplete[^]
Cheers!! Brij
Thanks alot, I will try it hope it works!
-
hey guys, I'm not good with Ajax, I am trying to connect to the database using ajax through asp.net. does anyone know how I can do this? please help :doh: Thanks guys
-
Best would be to use XMLHttpRequest(old times AJAX! :) ) in order to implement such kind of feature... On keypress, fire a XHR and check on server about the typed in data(connecting to database) and get back response accordingly. if you need to know about it, just google it, you will get number of articles on it!
I am not sure why this post was voted "1". I think this is the good answer, hence I upvoted it with my 5.
Cheers ! Abhijit Codeproject MVP