开发者

Button in hyperlink style

开发者 https://www.devze.com 2023-03-01 06:33 出处:网络
Hello friends can you tell me how to make style of button like hyperlink. I want to add Hyperlink to the Gri开发者_JS百科dView but Hyperlink has not Click event. I decided to use button, but make it a

Hello friends can you tell me how to make style of button like hyperlink. I want to add Hyperlink to the Gri开发者_JS百科dView but Hyperlink has not Click event. I decided to use button, but make it appearence like hyperlink


<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select" CssClass="linkBtn">LinkButton</asp:LinkButton>

with the class linkBtn like this one:

.linkBtn {
            border: none;
        }

And it looks like the same as HyperLink ^^


You can also use LinkButton. LinkButton has on click event or can use CommandName.


In GridView, Edit Column options, uncheck auto-generate columns, add the columns you want and use template field. Edit template and use Link Button there.

Also use GridView1_RowCommand() event for that Link Button.

0

精彩评论

暂无评论...
验证码 换一张
取 消