在Jquery Mobile中如果要指定一个按钮,可以写成

<a href=”Home/About” data-role="button">关于</a>

但是在Html.ActionLink中会有一些问题

<%=Html.ActionLink("关于","About","Home",null,new{@data-role="button"})%>这样写会报错的。

目前的解决办法有两种

1.

<a href="<%=Url.Action("About","Home")%>" data-role="button">关于</a>

2.

<%=Html.ActionLink("关于", "About", null, new Dictionary<string, object> { { "data-role","button" } })%>

  

相关文章:

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