Login.LoginButtonImageUrl Özellik

Tanım

Oturum açma düğmesi için kullanılacak görüntünün URL'sini alır veya ayarlar.

public:
 virtual property System::String ^ LoginButtonImageUrl { System::String ^ get(); void set(System::String ^ value); };
public virtual string LoginButtonImageUrl { get; set; }
member this.LoginButtonImageUrl : string with get, set
Public Overridable Property LoginButtonImageUrl As String

Özellik Değeri

Oturum açma düğmesi için kullanılan görüntünün URL'si. Varsayılan değer: Empty.

Örnekler

Aşağıdaki kod örneği, özelliğini görüntünün URL'sine ayarlar LoginButtonImageUrl .

<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <table>
        <tr>
          <td>
            <asp:Login id="Login1" 
                       runat="server" 
                       LoginButtonImageUrl="images/login.png" 
                       LoginButtonText="Submit the login form."
                       LoginButtonType="Image">
            </asp:Login>
          </td>
          <td>
            <asp:Button id="change" 
                        runat="server" 
                        Text="Change Login button." 
                        onClick="ChangeClick">
            </asp:Button>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>
<%@ Page Language="VB"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  Sub ChangeClick(ByVal sender As Object, ByVal e As EventArgs)
    
    If Login1.LoginButtonType = ButtonType.Image Then
      Login1.LoginButtonImageUrl = String.Empty
      Login1.LoginButtonType = ButtonType.Button
    Else
      Login1.LoginButtonImageUrl = "images/login.png"
      Login1.LoginButtonType = ButtonType.Image
    End If
    
  End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="Form1" runat="server">
      <table>
        <tr>
          <td>
            <asp:Login id="Login1" 
                       runat="server" 
                       LoginButtonImageUrl="images/login.png" 
                       LoginButtonText="Submit the login form."
                       LoginButtonType="Image">
            </asp:Login>
          </td>
          <td>
            <asp:Button id="change" 
                        runat="server" 
                        Text="Change Login button." 
                        onClick="ChangeClick">
            </asp:Button>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>

Açıklamalar

LoginButtonImageUrl özelliği olarak ayarlandığında Imagedenetim oturum açma düğmesi olarak Login işlenen görüntünün URL'sini LoginButtonType içerir.

LoginButtonText özelliği, görüntüleri görüntülemeyen tarayıcılarda görüntü için alternatif metin olarak kullanılır.

Şunlara uygulanır

Ayrıca bkz.