Search code examples
asp.netvisual-studio-2010asp.net-4.0visual-web-developer-2010

Using image button in login control


I want to use image as login button, i set the button type as image & image url, But image is not showing its just showing a simple button. Help me in this regard. [Note: I have converted login control to template]

     <asp:Login ID="Login1" runat="server" Width="400px"  LoginButtonImageUrl="~/App_Themes/Theme/login.png" LoginButtonType="Image" FailureText="Please Enter Valid User Name &amp; Password.">

. . . .


Solution

  • If you have convert it to template, then you must see all the html code that render the login control.

    There locate the id = LoginButton and change it to ImageButton something like

    <asp:ImageButton ImageUrl="~/img/SignIn.gif" ID="LoginButton"  runat="server" CommandName="Login" AlternateText="Sign In" Text="Log In" ValidationGroup="ctl00$Login1" CssClass="GreBtn" />