Wow, thanks for the quick answer.
I decided to try alternative 2.
I create a string that contains the whole script code, beginning with
<script=jscript> and ending with </script>. Then I use the
registerClientScriptBlock method to inject the string containing the
scriptcode into the aspx-page.
But I don't know how to use the DBResult class in this script block.
The DBResult class contains a string array and an object array, these two
things have to be assigned to jscript string arrays and object arrays. My
problem is, I don't know how to make the cross-language assignment in the
scriptblock.
I tried like this:
string script = "<script language=jscript>";
script += "function useResult() {";
script += "var result : DBResult =
nameOfTheProtectedVariableInCodeBehindOfTypDBResul t"; // Error in this line
script += "}";
script +="</script>";
RegisterClientScriptBlock("scriptBlock", script);
But this doesn't work.
Do I have to import something or so?
Thanks.
RFS666
"Grant Merwitz" wrote:
Two thing that comes to mind.
1) XmlHttp. Why not use Ajax to request the data in an Xml Format, which
your JScript can read and and set your 2d-graph appropriately.
2) Alternately, your C# code can write the JavaScript on page load and use
the Class DBResultSet while doing so
HTH
-G
"RFS666" <RF****@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com... Hello,
I have the following problem:
I have a web project where I display an activeX control that displays
2D-graphs on an aspx-page. I use jscript to access and modify the
properties
of the activeX-2D-control. In
codebehind, I use C# for the application logic (eg. the database access).
The query to the database retuns me an object of a C# class (called
DBResultSet) that contains all the data from the query. This data has then
to
be visualized on the 2d-graph activeX control on the .aspx-page
Here comes my question now:
How can I access the properties & methods of the class DBResultSet to
assign
them to arrays and objects in jscript.
I know that the activeX control and jscript work on the clientside and the
application logic (written in C#) runs on the server. But the activeX
control
can only be accessed on the clientside and I need the data from the
database
to be displayed in the activeX-control.
I hope, somebody can help
thanks in advance
RFS666