Share via


PasswordRecovery.SubmitButtonStyle 속성

정의

PasswordRecovery 컨트롤의 전송 단추 모양을 정의하는 속성이 들어 있는 컬렉션에 대한 참조를 가져옵니다.

public:
 property System::Web::UI::WebControls::Style ^ SubmitButtonStyle { System::Web::UI::WebControls::Style ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.Style SubmitButtonStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.SubmitButtonStyle : System.Web.UI.WebControls.Style
Public ReadOnly Property SubmitButtonStyle As Style

속성 값

Style

전송 단추의 모양을 정의하는 속성이 들어 있는 Style에 대한 참조입니다.

특성

예제

다음 코드 예제에서는 설정의 효과 보여 줍니다 SubmitButtonStyle 다양 한 유형의 제출 단추에 대 한 속성을 PasswordRecovery 제어 합니다.

<%@ 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 DropDownList1_SelectedIndexChanged(object Sender, EventArgs e)
  {
    if (DropDownList1.SelectedValue == "Button")
    {
      PasswordRecovery1.SubmitButtonType = ButtonType.Button;
      // <Snippet4>
      PasswordRecovery1.SubmitButtonText = "Enter User Name";
      // </Snippet4>
    }
  
    if (DropDownList1.SelectedValue == "Image")
    {
      PasswordRecovery1.SubmitButtonType = ButtonType.Image;
      // <Snippet3>
      PasswordRecovery1.SubmitButtonImageUrl = "userNameSubmit.png";
      // </Snippet3>
      PasswordRecovery1.SubmitButtonText = "Enter User Name Image";
    }
  
    if (DropDownList1.SelectedValue == "Link")
    {
      PasswordRecovery1.SubmitButtonType = ButtonType.Link;
      PasswordRecovery1.SubmitButtonText = "Enter User Name";
    }
  }
  
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head>
    <title>ASP.NET Example</title>
</head>
  <body>
    <form id="Form1" runat="server">
      <table border="1">
        <tbody>
          <tr>
            <td>
              <asp:passwordrecovery id="PasswordRecovery1" runat="server"
                submitbuttonimageurl="userNameSubmit.png"
                submitbuttontext="Enter User Name">
                <submitbuttonstyle font-names="Comic Sans MS" 
                  forecolor="White" 
                  backcolor="#00C000">
                </submitbuttonstyle>
              </asp:passwordrecovery>
            </td>
            <td align="center">
              Choose a button type:<br />
              <asp:dropdownlist id="DropDownList1" runat="server" 
                onselectedindexchanged="DropDownList1_SelectedIndexChanged"
                autopostback="true">
                <asp:listitem value="Button">Button</asp:listitem>
                <asp:listitem value="Image">Image</asp:listitem>
                <asp:listitem value="Link">Link</asp:listitem>
              </asp:dropdownlist>
            </td>
          </tr>
        </tbody>
      </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 DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    If DropDownList1.SelectedValue = "Button" Then
      PasswordRecovery1.SubmitButtonType = ButtonType.Button
      ' <Snippet4>
      PasswordRecovery1.SubmitButtonText = "Enter User Name"
      ' </Snippet4>
    End If
    If DropDownList1.SelectedValue = "Image" Then
      PasswordRecovery1.SubmitButtonType = ButtonType.Image
      ' <Snippet3> -->
      PasswordRecovery1.SubmitButtonImageUrl = "userNameSubmit.png"
      ' </Snippet3> -->
      PasswordRecovery1.SubmitButtonText = "Enter User Name Image"
    End If
    If DropDownList1.SelectedValue = "Link" Then
      PasswordRecovery1.SubmitButtonType = ButtonType.Link
      PasswordRecovery1.SubmitButtonText = "Enter User Name"
    End If
  End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head>
    <title>ASP.NET Example</title>
</head>
  <body>
    <form id="Form1" runat="server">
      <table border="1">
        <tbody>
          <tr>
            <td>
              <asp:passwordrecovery id="PasswordRecovery1" runat="server"
                submitbuttonimageurl="userNameSubmit.png"
                submitbuttontext="Enter User Name">
                <submitbuttonstyle font-names="Comic Sans MS" 
                  forecolor="White" 
                  backcolor="#00C000">
                </submitbuttonstyle>
              </asp:passwordrecovery>
            </td>
            <td align="center">
              Choose a button type:<br />
              <asp:dropdownlist id="DropDownList1" runat="server" 
                onselectedindexchanged="DropDownList1_SelectedIndexChanged"
                autopostback="true">
                <asp:listitem value="Button">Button</asp:listitem>
                <asp:listitem value="Image">Image</asp:listitem>
                <asp:listitem value="Link">Link</asp:listitem>
              </asp:dropdownlist>
            </td>
          </tr>
        </tbody>
      </table>
    </form>
  </body>
</html>

설명

합니다 SubmitButtonStyle 속성에서 제출 단추의 모양을 정의 합니다 PasswordRecovery 제어 합니다. 이 속성은 읽기 전용입니다. 그러나의 속성을 설정할 수는 Style 개체를 반환 합니다. 형식에서 선언적으로 이러한 속성을 설정할 수 있습니다 Property-Subproperty, 여기서 Subproperty 의 속성을 나타냅니다 합니다 Style 클래스 (예를 들어 SubmitButtonStyle-ForeColor). 형태로 속성을 프로그래밍 방식으로 설정할 수도 있습니다 Property.Subproperty (예를 들어 SubmitButtonStyle.ForeColor).

일반 설정 사용자 지정 배경색, 텍스트 색 및 글꼴 속성을 포함 합니다.

에 대 한 스타일 설정을 합니다 SubmitButtonStyle 속성에 대 한 스타일 설정을 사용 하 여 병합 되는 PasswordRecovery 컨트롤. 모든 설정이 합니다 SubmitButtonStyle 속성의 속성에서 해당 설정을 재정의 PasswordRecovery 제어 합니다.

다음 PasswordRecovery 속성은 SubmitButtonStyle 설정:

초기 모양을 보거나 질문을 정의 하는 데 템플릿을 사용할 때의 PasswordRecovery 컨트롤을 SubmitButtonStyle 속성이 적용 되지 않습니다.

적용 대상

추가 정보