Aug 18, 2009, 9:42 AM
How to access javascript variables within Coolite?Hi
Hi,
I have defined a javascript variable as follows
Neither of the following trials do work:
Many thanks in advance
Hans Weber
PS
I have defined a javascript variable as follows
<body>
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<script type="text/javascript">
var myid = <%= ViewData["id"] %>;
</script>
I also can access and display this variable<h2>
<script type="text/javascript" >
document.write(myid );
</script>
</h2>
<h2><%= Html.Encode(ViewData["myid "]) %></h2>
But how can I access this variable within an ext-Control?Neither of the following trials do work:
<ext:Label id = "testFilter" runat="server" Text='<%# this.myid %>' AutoDataBind="true" />
<ext:Label id = "testFilter" runat="server" Text='<%# myid %>' AutoDataBind="true" />
<ext:Label id = "testFilter" runat="server" Text='<%# {myid} %>' AutoDataBind="true" />
<ext:Label id = "testFilter" runat="server" Text='#{id}' AutoDataBind="true" />
A possible solution: (But the origin problem, that I can't assign myid to a control's value still remains.)<ext:Label id = "testFilter" runat="server" Text='<%# this.ViewData["id"] %>' AutoDataBind="true" />
Is there a documentation of the syntax how to access variables in general withing Coolite? And if yes, where can I download it?Many thanks in advance
Hans Weber
PS