开发者

is there a panel default for a LinkButton?

开发者 https://www.devze.com 2023-03-01 07:06 出处:网络
I was usingwith a DefaultButton=\"searchButton\" attribute.I replace the button with andis there a attribute to default to that link button? or is there another way?

I was using with a DefaultButton="searchButton" attribute. I replace the button with and is there a attribute to default to that link button? or is there another way?

<asp:Panel ID="Panel1" runat="server" DefaultButton="searchButton">
     //New
     <asp:LinkButton id="searchButton" runat="server" OnClick="searchRedirect"> 
     <img alt="" src="images/SearchButton.png" style="margin:2px 0px 0px 10px; border:0px;" />
     </asp:LinkButt开发者_JS百科on>
     //Old
     <asp:Button ID="searchButton" runat="server" OnClick="searchRedirect" />
</asp:Panel>  


You may try your OLD button with the image added via CSS :

<asp:Button ID="searchButton" runat="server" OnClick="searchRedirect" CssClass="searchButton" />

with

.searchButton {
    background: url(../images/SearchButton.png) no-repeat left top;
    }


Use here instead of because when linkbutton render in html at that time it convert into tag and a tag never works like a button.

0

精彩评论

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

关注公众号