Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Newbie Query a database using javascript or ajax

$
0
0

Sorry, im brand new to ASP, ive searched the forums but cant seem to find a definitive answer.

I've a web form with a formview that when the user tabs into each field I want to fill in a paragraph of help text on the right of the screen.  I want the help text for each field to be stored in a database table as there are 4 elements, areaTitle, areaHelpText, fieldTitle and FieldHelp text.  My question is:

Can I add a javascript function that accesses the sql database and brings back the 4 elements to populate them on the screen? (if so any examples)

Or

Would I use the built in ajax controls and put the help fields in a updatePanel, accessesing the sql table in the page on load? If so how do I partial postback the panel on the blur of the field I am displaying the help for in javascript?

OR

Do I write a webservice to bring back the help fields calling it from the field onBlur event? Ive tried this using the XMLHTTP cjavascript classes but cant seem to get it quite right so would appreciate any examples?

Thanks in advance to anybody who replies, as I said this is my first application so would appreciate some guidance on the best way and some examples if anybody has any!


Viewing all articles
Browse latest Browse all 5678

Trending Articles