HtmlInputReset 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
HtmlInputReset 클래스의 새 인스턴스를 초기화합니다.
오버로드
HtmlInputReset() |
기본값을 사용하여 HtmlInputReset 클래스의 새 인스턴스를 초기화합니다. |
HtmlInputReset(String) |
지정된 입력 형식을 사용하여 HtmlInputReset 클래스의 새 인스턴스를 초기화합니다. |
HtmlInputReset()
기본값을 사용하여 HtmlInputReset 클래스의 새 인스턴스를 초기화합니다.
public:
HtmlInputReset();
public HtmlInputReset ();
Public Sub New ()
예제
다음 코드 예제를 사용 하는 방법에 설명 합니다 HtmlInputReset : Web 페이지 form의 값을 다시 설정할 컨트롤입니다.
<%@ 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">
protected void Page_Load(object sender, EventArgs e)
{
// Define an HtmlInputReset button using the default constructor.
HtmlInputReset reset1 = new HtmlInputReset();
reset1.ID = "ResetButton1";
reset1.Value = "Reset 1";
// Define an HtmlInputReset button as type "reset".
HtmlInputReset reset2 = new HtmlInputReset("reset");
reset2.ID = "ResetButton2";
reset2.Value = "Reset 2";
// Define an HtmlInputReset button as custom type "custom".
// This is not a valid HTML input type so a standared input
// field will be displayed.
HtmlInputReset reset3 = new HtmlInputReset("custom");
reset3.ID = "ResetButton3";
reset3.Value = "Reset 3";
// Clear the PlaceHolder control and add the Reset buttons to it.
PlaceHolder.Controls.Clear();
PlaceHolder.Controls.Add(reset1);
PlaceHolder.Controls.Add(new LiteralControl("<br />"));
PlaceHolder.Controls.Add(reset2);
PlaceHolder.Controls.Add(new LiteralControl("<br />"));
PlaceHolder.Controls.Add(reset3);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>HtmlInputReset Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3> HtmlInputReset Example </h3>
<asp:PlaceHolder id="PlaceHolder"
runat="server">
</asp:PlaceHolder>
<br />
Change the text in the input field and then click
"Reset 1" or "Reset 2" to change it back to its initial
value.
</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">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
' Define an HtmlInputReset button using the default constructor.
Dim reset1 As New HtmlInputReset()
reset1.ID = "ResetButton1"
reset1.Value = "Reset 1"
' Define an HtmlInputReset button as type "reset".
Dim reset2 As New HtmlInputReset("reset")
reset2.ID = "ResetButton2"
reset2.Value = "Reset 2"
' Define an HtmlInputReset button as custom type "custom".
' This is not a valid HTML input type so a standared input
' field will be displayed.
Dim reset3 As New HtmlInputReset("custom")
reset3.ID = "ResetButton3"
reset3.Value = "Reset 3"
' Clear the PlaceHolder control and add the Reset buttons to it.
PlaceHolder.Controls.Clear()
PlaceHolder.Controls.Add(reset1)
PlaceHolder.Controls.Add(New LiteralControl("<br />"))
PlaceHolder.Controls.Add(reset2)
PlaceHolder.Controls.Add(New LiteralControl("<br />"))
PlaceHolder.Controls.Add(reset3)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>HtmlInputReset Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3> HtmlInputReset Example </h3>
<asp:PlaceHolder id="PlaceHolder"
runat="server">
</asp:PlaceHolder>
<br />
Change the text in the input field and then click
"Reset 1" or "Reset 2" to change it back to its initial
value.
</form>
</body>
</html>
설명
다음 표에서 인스턴스에 대 한 초기 속성 값을 HtmlInputReset입니다.
속성 | 값 |
---|---|
HtmlControl.TagName | "재설정" 리터럴 문자열입니다. |
적용 대상
HtmlInputReset(String)
지정된 입력 형식을 사용하여 HtmlInputReset 클래스의 새 인스턴스를 초기화합니다.
public:
HtmlInputReset(System::String ^ type);
public HtmlInputReset (string type);
new System.Web.UI.HtmlControls.HtmlInputReset : string -> System.Web.UI.HtmlControls.HtmlInputReset
Public Sub New (type As String)
매개 변수
- type
- String
입력 유형입니다.
예제
다음 코드 예제를 사용 하는 방법에 설명 합니다 HtmlInputReset : Web 페이지 form의 값을 다시 설정할 컨트롤입니다.
<%@ 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">
protected void Page_Load(object sender, EventArgs e)
{
// Define an HtmlInputReset button using the default constructor.
HtmlInputReset reset1 = new HtmlInputReset();
reset1.ID = "ResetButton1";
reset1.Value = "Reset 1";
// Define an HtmlInputReset button as type "reset".
HtmlInputReset reset2 = new HtmlInputReset("reset");
reset2.ID = "ResetButton2";
reset2.Value = "Reset 2";
// Define an HtmlInputReset button as custom type "custom".
// This is not a valid HTML input type so a standared input
// field will be displayed.
HtmlInputReset reset3 = new HtmlInputReset("custom");
reset3.ID = "ResetButton3";
reset3.Value = "Reset 3";
// Clear the PlaceHolder control and add the Reset buttons to it.
PlaceHolder.Controls.Clear();
PlaceHolder.Controls.Add(reset1);
PlaceHolder.Controls.Add(new LiteralControl("<br />"));
PlaceHolder.Controls.Add(reset2);
PlaceHolder.Controls.Add(new LiteralControl("<br />"));
PlaceHolder.Controls.Add(reset3);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>HtmlInputReset Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3> HtmlInputReset Example </h3>
<asp:PlaceHolder id="PlaceHolder"
runat="server">
</asp:PlaceHolder>
<br />
Change the text in the input field and then click
"Reset 1" or "Reset 2" to change it back to its initial
value.
</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">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
' Define an HtmlInputReset button using the default constructor.
Dim reset1 As New HtmlInputReset()
reset1.ID = "ResetButton1"
reset1.Value = "Reset 1"
' Define an HtmlInputReset button as type "reset".
Dim reset2 As New HtmlInputReset("reset")
reset2.ID = "ResetButton2"
reset2.Value = "Reset 2"
' Define an HtmlInputReset button as custom type "custom".
' This is not a valid HTML input type so a standared input
' field will be displayed.
Dim reset3 As New HtmlInputReset("custom")
reset3.ID = "ResetButton3"
reset3.Value = "Reset 3"
' Clear the PlaceHolder control and add the Reset buttons to it.
PlaceHolder.Controls.Clear()
PlaceHolder.Controls.Add(reset1)
PlaceHolder.Controls.Add(New LiteralControl("<br />"))
PlaceHolder.Controls.Add(reset2)
PlaceHolder.Controls.Add(New LiteralControl("<br />"))
PlaceHolder.Controls.Add(reset3)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>HtmlInputReset Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3> HtmlInputReset Example </h3>
<asp:PlaceHolder id="PlaceHolder"
runat="server">
</asp:PlaceHolder>
<br />
Change the text in the input field and then click
"Reset 1" or "Reset 2" to change it back to its initial
value.
</form>
</body>
</html>
설명
다음 표에서 인스턴스에 대 한 초기 속성 값을 HtmlInputReset입니다.
속성 | 값 |
---|---|
HtmlControl.TagName | type 매개 변수의 값입니다. |
설정 합니다 type
매개 변수 값을 유효한 HTML로 인식 되지 <input>
요소는 기본 HTML 결과 <input>
요소를 한 줄 텍스트 입력된 필드와 합니다.