HtmlInputText コンストラクタ (String)
アセンブリ: System.Web (system.web.dll 内)


このコンストラクタを使用して、指定した入力コントロール タイプで HtmlInputText コントロールの新しいインスタンスを作成し、初期化します。このコンストラクタを使用すると、password などの特定のタイプのテキスト ボックス コントロールを作成できます。現在は password タイプまたは text タイプだけがサポートされています。このコンストラクタは、それらが利用可能になる場合に、他のタイプのテキスト ボックスを作成できるように設計されています。
HtmlInputText のインスタンスの初期プロパティ値を次の表に示します。

<%@ Page Language="VB" AutoEventWireup="True" %> <html> <script runat="server" > Sub Page_Load(sender As Object, e As EventArgs) ' Create an HtmlInputText control. Dim text As HtmlInputText = New HtmlInputText("password") text.MaxLength = 20 text.Size = 22 ' Add the control to the Controls collection of the ' PlaceHolder control. Place.Controls.Clear() Place.Controls.Add(text) End Sub Sub Button_Click(sender As Object, e As EventArgs) ' Insert secure authentication here. ' Make sure to use SSL to secure the connection. End Sub </script> <body> <form runat="server"> <h3> HtmlInputText Constructor Example </h3> Enter your password: <br> <asp:PlaceHolder id="Place" runat="server"/> <br><br> <input Type="submit" Value="Submit" OnServerClick = "Button_Click" runat="server"/> </form> </body> </html>
<%@ Page Language="C#" AutoEventWireup="True" %> <html> <script runat="server" > void Page_Load(Object sender, EventArgs e) { // Create an HtmlInputText control. HtmlInputText text = new HtmlInputText("password"); text.MaxLength = 20; text.Size = 22; // Add the control to the Controls collection of the // PlaceHolder control. Place.Controls.Clear(); Place.Controls.Add(text); } void Button_Click(Object sender, EventArgs e) { // Insert secure authentication here. // Make sure to use SSL to secure the connection. } </script> <body> <form runat="server"> <h3> HtmlInputText Constructor Example </h3> Enter your password: <br> <asp:PlaceHolder id="Place" runat="server"/> <br><br> <input Type="submit" Value="Submit" OnServerClick = "Button_Click" runat="server"/> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


HtmlInputText コンストラクタ

名前 | 説明 |
---|---|
HtmlInputText () | 既定値を使用して HtmlInputText クラスの新しいインスタンスを初期化します。 |
HtmlInputText (String) | 入力コントロール タイプを指定して、HtmlInputText クラスの新しいインスタンスを初期化します。 |

関連項目
HtmlInputText クラスHtmlInputText メンバ
System.Web.UI.HtmlControls 名前空間
HtmlInputPassword クラス
その他の技術情報
HTML サーバー コントロールHtmlInputText コンストラクタ ()
アセンブリ: System.Web (system.web.dll 内)


このコンストラクタを使用して、既定値で HtmlInputText コントロールの新しいインスタンスを作成し、初期化します。このコンストラクタは text タイプのテキスト ボックス コントロールを作成します。
HtmlInputText のインスタンスの初期プロパティ値を次の表に示します。

<%@ Page Language="VB" AutoEventWireup="True" %> <html> <script runat="server" > Sub Page_Load(sender As Object, e As EventArgs) ' Create an HtmlInputText control. Dim text As HtmlInputText = New HtmlInputText() text.Value = "Enter a value." text.MaxLength = 20 text.Size = 22 ' Add the control to the Controls collection of the ' PlaceHolder control. Place.Controls.Clear() Place.Controls.Add(text) End Sub </script> <body> <form runat="server"> <h3> HtmlInputText Constructor Example </h3> <asp:PlaceHolder id="Place" runat="server"/> </form> </body> </html>
<%@ Page Language="C#" AutoEventWireup="True" %> <html> <script runat="server" > void Page_Load(Object sender, EventArgs e) { // Create an HtmlInputText control. HtmlInputText text = new HtmlInputText(); text.Value = "Enter a value."; text.MaxLength = 20; text.Size = 22; // Add the control to the Controls collection of the // PlaceHolder control. Place.Controls.Clear(); Place.Controls.Add(text); } </script> <body> <form runat="server"> <h3> HtmlInputText Constructor Example </h3> <asp:PlaceHolder id="Place" runat="server"/> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からHtmlInputText コンストラクタを検索する場合は、下記のリンクをクリックしてください。

- HtmlInputText コンストラクタのページへのリンク