0

can some one give me some perfect example or point me to the blog or forum where I can find jquery link with database. That is jquery doing some manuplation on the values from the database ? especially checkboxes and radio button

I only want the example linking client side and server side interaction using jquery

3
  • 3
    You'll need to be more specific. jQuery is a javascript framework suitable for manipulating the DOM and performing AJAX queries. It has absolutely nothing to do with a database. Commented May 8, 2010 at 16:01
  • sorry I mean jquery link with asp.net. like base on the value retrieve from database a whole div is hidden or not hidden using jquery Commented May 8, 2010 at 16:04
  • 1
    Aha, you might wan't to edit your above question to mention that. You could use jQuery for manipulating the client-side database which is a whole different beast. Commented May 8, 2010 at 16:07

2 Answers 2

2

You need to read up on the concepts behind AJAX. Getting a value from a database has nothing to do with JS.

One approach is to use ASP.NET WebMethods and a ScriptManager to link your codebehind (Where you have DB access) to your JS on the client side.

http://www.xdevsoftware.com/blog/post/Call-WebMethod-from-Javascript-in-ASPNET.aspx

This way your javascript calls a method in your codebehind that looks up the value and returns it to your javascript which will then use jQuery to show/hide a div for you.

Javascript (ask for show/hide status) -> Webmethod (ASP.NET DB Lookup) -> Javascript (show hide with jquery based on result)

Sign up to request clarification or add additional context in comments.

Comments

2

Javascript has nothing to do with DBs. It, on the other hand, can interact with server side scripts (trough AJAX) that can interact with DBs.

Check out the jQuery.ajax() method here: http://api.jquery.com/jQuery.ajax/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.