VS2010 IntelliSense inside text/x-jquery-tmpl script templates

前端 未结 5 1611
北海茫月
北海茫月 2021-01-01 14:53

I\'ve been using jQuery templates which I absolutely love to use. The only drawback from an IDE standpoint is the lack of HTML IntelliSense inside the script tag. Is there

5条回答
  •  清歌不尽
    2021-01-01 15:07

    Another WebForms solution, not as thorough or elegant as Rusted's solution, but I drop these two functions inside of a BasePage class from which all my other pages inherit:

    Public Function Template(ByVal id As String) As String
        ' the type attribute does not matter as long as it's not "text/javascript"
        Return ""
    End Function
    

    Then in my aspx:

     <%= Template("templateID")%>
         ... your template code goes here ...
     <%= Template()%>
    

提交回复
热议问题