This is a migrated thread and some comments may be shown as answers.

using <asp:...> in <script type"text/javascript"> blocks

1 Answer 35 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerremy
Top achievements
Rank 1
Jerremy asked on 20 Jan 2010, 09:27 AM
JustCode gives an error when you do this:
<script type="text/javascript">
    var blabla = <asp:Literal ID="lBlaBla" runat="server"></asp:Literal>;
</script>

It'll also say (in the code behind) that lBlaBla doesn't exist.

And while it might not be "best practice" to do this, ASP.NET doesnt mind you doing it.

1 Answer, 1 is accepted

Sort by
0
Tsviatko Yovtchev
Telerik team
answered on 21 Jan 2010, 09:58 AM
Hi Jerremy,

 Thanks for taking the time to contact us on that issue. We have already had similar issues reported and we are currently working on improving our <asp:Literal> support (that is the root of the problem). The fix is scheduled for release two weeks from now. So, please stay tuned. And do not hesitate to contact us if you have any further problems.

Regards,
Tsviatko Yovtchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Code Analysis
Asked by
Jerremy
Top achievements
Rank 1
Answers by
Tsviatko Yovtchev
Telerik team
Share this question
or