Create javaScript variable in code behind of asp.net

前端 未结 4 2160
不知归路
不知归路 2020-12-16 19:39

How do I register a Javascript variable on the server side (backend) and access it on the client side (Javascript file), without a hidden field, Literal, etc.?

4条回答
  •  别那么骄傲
    2020-12-16 19:55

    You can put the following code in .aspx file ...

    
    
    <%:  %> works under ASP.NET 4
    

提交回复
热议问题