This documentation is archived and is not being maintained.

Login.LoginButtonImageUrl Property

Gets or sets the URL of an image to use for the login button.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public virtual string LoginButtonImageUrl { get; set; }
<asp:Login LoginButtonImageUrl="String" />

Property Value

Type: System.String
The URL of the image used for the login button. The default is Empty.

The LoginButtonImageUrl property contains the URL of the image rendered as the Login control login button when the LoginButtonType property is set to Image.

The LoginButtonText property is used as the alternative text for the image in browsers that do not display images.

The following code example sets the LoginButtonImageUrl property to the URL of an image.

<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<script runat="server">
void ChangeClick(object sender, EventArgs e)
    if (Login1.LoginButtonType == ButtonType.Image)
        Login1.LoginButtonImageUrl = String.Empty;
        Login1.LoginButtonType = ButtonType.Button;
        Login1.LoginButtonImageUrl = "images/login.png";
        Login1.LoginButtonType = ButtonType.Image;

<html xmlns="" >
  <head runat="server">
    <title>ASP.NET Example</title>
    <form id="form1" runat="server">
            <asp:Login id="Login1" 
                       LoginButtonText="Submit the login form."
            <asp:Button id="change" 
                        Text="Change Login button." 

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0