heyy...
I have a set of string in a variable ...I want set this variable to a javascript in (C# code behind).... I tried but won't get result ....
Here is My code...
var dataString = "var dataString=\' <chart caption="\"Top" 5="" employees="" for="" mode="hold" /> dataString += " subCaption=\"(Click to slice out or right click to choose rotation mode)\" YAxisName=\"Sales Achieved\" showValues=\"0\" ";
dataString += "numberPrefix=\"$\" formatNumberScale=\"0\" showPercentInToolTip=\"0\" showLabels=\"0\" showLegend=\"1\">";
dataString += "<set label="\"Leverling\"" value="\"100524\"" issliced="\"0\"" />";
dataString += "<set label="\"Fuller\"" value="\"87790\"" issliced="\"0\"" />";
dataString += "<set label="\"Davolio\"" value="\"81898\"" issliced="\"0\"" />";
dataString += "<set label="\"Peacock\"" value="\"76438\"" issliced="\"0\"" />";
dataString += "<set label="\"King\"" value="\"57430\"" issliced="\"0\"" />";
dataString += "<styles>";
dataString += "<definition>";
dataString += "<style type=\"font\" name=\"CaptionFont\" color=\"666666\" size=\"15\" />";
dataString += "<style type=\"font\" name=\"SubCaptionFont\" bold=\"0\" />";
dataString += "</definition>";
dataString += "<application>";
dataString += "<apply toobject="\"caption\"" styles="\"CaptionFont\"" />";
dataString += "<apply toobject="\"SubCaption\"" styles="\"SubCaptionFont\"" />";
dataString += "</application>";
dataString += "</styles>";
dataString += "'";
and My Javascript is :-
string Gal = @"<script>
if (GALLERY_RENDERER && GALLERY_RENDERER.search(/javascript|flash/i) == 0)
FusionCharts.setCurrentRenderer(GALLERY_RENDERER);
var chart = new FusionCharts('Charts/Pie3D.swf', 'ChartID', '500', '500', 'false', 'true');
chart.setXMLData('dataString');
chart.render('divChart');
</script>";
ClientScript.RegisterStartupScript(GetType(), "jsdatepic2", Gal);
I want dataString value to javascript....