is there a panel default for a LinkButton?
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.
精彩评论