作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
如何为访问 key 的第一个字母加上下划线?
最佳答案
asp:buttons 输出为 html“输入”标签,类型为“提交”。显示在它们上面的文本在标签的“值”属性中输出,因此不能包含任何样式或 html。如果你能得到一个 asp:button 输出为 html 按钮,那么你可以尝试类似的东西:
<button id="mybutton" runat="server" onserverclick="myfunction">
<span style="text-decoration:underline;">P</span>rint</button>
并在您的 C# 代码中使用普通按钮事件:
protected void myfunction(object sender, EventArgs e)
{
Response.Write("clicked");
}
关于c# - 如何为 <asp :button>? 的访问 key 添加下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/220975/
我是一名优秀的程序员,十分优秀!