<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
      OnClientClick='return confirm("Delete the datasource <%# Eval("Title") %>?");'
      Text="delete" />

可以使用另一种写法完成所要表达的意思:

OnClientClick='<%# Eval("Title","return confirm(\"Delete the datasource {0}?\")") %>'

 在一个服务器端控件中使用多个Eval

OnClientClick='<%# String.Format("return ConfirmWindow(\"{0}\",\"{1}\")", Eval("Title"), Eval("Message")) %>'

 

相关文章:

  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-01
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2021-09-06
  • 2021-11-05
  • 2022-12-23
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
相关资源
相似解决方案