Server tags cannot contain <% … %> constructs

前端 未结 4 1581
不思量自难忘°
不思量自难忘° 2020-12-01 06:54

I am trying to use CDN for my images on the website. Problem is, sometimes I have server controls such as ImageButton, and I would like to use a class in order to fully extr

4条回答
  •  星月不相逢
    2020-12-01 07:06

    In case someone else comes across this thread in the future, you can get the required outcome by surrounding the server tag with single quotes, rather than double quotes.

    The original:

    " />
    

    The new version:

    
    

    This works in .Net 4.0, but I would presume that it would work in the other versions too.

提交回复
热议问题