asp.net 中<%#Eval("")%><%=%>区别。

 <%#Eval("")%> 是绑定服务端数据的。

例如:<asp:TextBox runat="server" ID="txtscore" Text='<%# Eval("score")%>'  Width="100px"></asp:TextBox> //score是后台查出的字段名称。

<%=%> 是绑定客户端数据的。

例如:c# code:string teststr="hello world";

  html:<input type="text" value="<%=teststr%>">

 

相关文章:

  • 2021-07-21
  • 2021-11-16
  • 2021-10-02
  • 2022-01-22
  • 2022-01-11
  • 2022-01-27
  • 2021-09-21
  • 2022-01-01
猜你喜欢
  • 2021-04-25
  • 2021-12-26
相关资源
相似解决方案