[英]ASP Button Edit in GridView ASP.NET C#
I'm trying to make an Edit button in gridview. 我正在尝试在gridview中创建一个Edit按钮。 So far I can only add a delete asp:button but what about edit button?
到目前为止我只能添加一个删除asp:按钮但是编辑按钮呢? Is there any way I could modify the CommandField to look like asp:button instead of linkbutton?
有什么办法可以修改CommandField看起来像asp:button而不是linkbutton?
Any help would be much appreciated. 任何帮助将非常感激。 Thanks in advance ;)
提前致谢 ;)
Yes you can do that. 是的,你可以这么做。 You need to write the CSS for links to look like buttons.
您需要为链接编写CSS,使其看起来像按钮。
将ButtonType
属性设置为Button
<asp:CommandField ButtonType="Button" ShowEditButton="True" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.