ASPX: Custom language injection

I have a custom ASP.NET WebForms control which contains a block of Javascript:

<cc:ClientScriptBlock runat="server">
$(function(){
...
});
</cc:ClientScriptBlock>

Is there any way to tell R# that the content of this tag should be treated as Javascript, instead of HTML / ASPX?

0
2 comments

Hello Richard,

The only way here is to create a custom R# extension which will provide the same feature. If you are interested in it, please let me know.

Thanks!  

0

Thanks for the information.

I guess it might work if I add <script> tags within the control, and then strip them out before I process the contents?

<cc:ClientScriptBlock runat="server"><script>
$(function(){
...
});
</script></cc:ClientScriptBlock>

I'll give that a try when I get the chance.

0

Please sign in to leave a comment.