if you want any dabase value in javascript you need to user jquery and do Ajax Call to to cs page and retuen Data and you get this value in javascript.
I guess you want to get The values from database To be.viewed on your webpage Ok so try to.get The value.from the.database through sql select clause After that make Those values a variable From those values Write.the data on.the webpage
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
Abhimanyu Re...
0 Points
9 Posts
Asp.net(Java Scripts)
Nov 30, 2012 05:14 AM|LINK
Hi Friends can anyone help me How to get values into java script from Database.
I Was trying to show chart/bar/line graphs on my asp pages for that I need to bring the values on graphs from database. how can I do that?
chandrasheka...
Star
10258 Points
1760 Posts
Re: Asp.net(Java Scripts)
Nov 30, 2012 05:54 AM|LINK
Hi,
Refer the following link which gives you the brief intro of Microsoft Chart controls and binding the data from data base to chart controls.
http://www.4guysfromrolla.com/articles/072209-1.aspx
Refer the following link for chart plug-in with JQuery.
http://www.jqplot.com/tests/
Please try the answer for the post and finally Don't forget to click “Mark as Answer” on the post that helped you.
ashoksudani
Participant
1043 Points
213 Posts
Re: Asp.net(Java Scripts)
Nov 30, 2012 06:43 AM|LINK
if you want any dabase value in javascript you need to user jquery and do Ajax Call to to cs page and retuen Data and you get this value in javascript.
http://www.ezzylearning.com/tutorial.aspx?tid=5869127
http://vipullimbachiya.com/jQuery/AjaxJSON.aspx
http://stackoverflow.com/questions/5756147/basic-simple-asp-net-jquery-json-example
parthi789
Member
32 Points
11 Posts
Re: Asp.net(Java Scripts)
Nov 30, 2012 10:15 AM|LINK
Hi Abhimanyu
Just write the page methods .
For that you have to do 'EnablePageMethods="true"' in ScriptManager.then,
In .CS page:
[System.Web.Services.WebMethod]
public static string function_name()
{
return result;
}
In aspx page just use this javascript
PageMethods.function_name(onSucess, onError);
function onSucess(result) {
//you can assign the result to your control
}
function onError(result) {
}
Afzaal.Ahmad...
Contributor
2759 Points
1060 Posts
Re: Asp.net(Java Scripts)
Dec 02, 2012 06:15 AM|LINK
~~! FIREWALL !~~