ylbtech-ASP.NET-Control-Basic:WebForm 窗體控件使用及總結 |
ASP.NET中 WebForm 窗體控件使用及總結。
1.A,運行效果圖返回頂部 |
Web窗體控件
1,文本框1_1,文本框:
1_2,密碼框:
1_3,文本域:
2,按鈕
2_1,普通按鈕:
2_2,鏈接按鈕(假鏈接): LinkButton
2_3,圖片按鈕:
3,超鏈接 作用:負責頁面之間的導航
HyperLink
4,標簽 特點無色透明, 作用:呈現文本,方便控制
Label
5,隱藏控件
6,圖片

7,上傳控件
8,復選框
8_1,復選框:
8_2,復選框組:
9,單選框
9_1,單選框:
9_2,單選框組:
10,下拉框
11,列表框
11_1,單選, 11_2,多選,
12,面板
你好嗎?
|
|||||||||
周日 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 | |||
---|---|---|---|---|---|---|---|---|---|
24 | 25 | 26 | 27 | 28 | 1 | 2 | |||
3 | 4 | 5 | 6 | 7 | 8 | 9 | |||
10 | 11 | 12 | 13 | 14 | 15 | 16 | |||
17 | 18 | 19 | 20 | 21 | 22 | 23 | |||
24 | 25 | 26 | 27 | 28 | 29 | 30 | |||
31 | 1 | 2 | 3 | 4 | 5 | 6 |
13,PlaceHolder(像Panel的面板)
你好嗎?
|
|||||||||
周日 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 | |||
---|---|---|---|---|---|---|---|---|---|
24 | 25 | 26 | 27 | 28 | 1 | 2 | |||
3 | 4 | 5 | 6 | 7 | 8 | 9 | |||
10 | 11 | 12 | 13 | 14 | 15 | 16 | |||
17 | 18 | 19 | 20 | 21 | 22 | 23 | |||
24 | 25 | 26 | 27 | 28 | 29 | 30 | |||
31 | 1 | 2 | 3 | 4 | 5 | 6 |
1.B,源代碼返回頂部 |

<div> <h3>Web窗體控件</h3> 1,文本框<br /> 1_1,文本框:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br /> 1_2,密碼框:<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox> <br /> 1_3,文本域:<asp:TextBox ID="TextBox3" runat="server" TextMode="MultiLine"></asp:TextBox> <br /> <br /> 2,按鈕<br /> 2_1,普通按鈕:<asp:Button ID="Button1" runat="server" Text="Button" /> <br /> 2_2,鏈接按鈕(假鏈接):<asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/MuDiYeMian.aspx">LinkButton</asp:LinkButton> <br /> 2_3,圖片按鈕:<asp:ImageButton ID="ImageButton1" runat="server" Height="28px" ImageUrl="http://images.cnblogs.com/cnblogs_com/ylbtech/403178/o_sanyecao.jpg" PostBackUrl="~/MuDiYeMian.aspx" Width="149px" /> <br /> <br /> 3,超鏈接 作用:負責頁面之間的導航<br /> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/MuDiYeMian.aspx">HyperLink</asp:HyperLink> <br /> <br /> 4,標簽 特點無色透明, 作用:呈現文本,方便控制<br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <br /> <br /> 5,隱藏控件<br /> <asp:HiddenField ID="HiddenField1" runat="server" /> <br /> 6,圖片<br /> <asp:Image ID="Image1" runat="server" ImageUrl="http://images.cnblogs.com/cnblogs_com/ylbtech/403178/o_sanyecao.jpg" /> <br /> <br /> 7,上傳控件<br /> <asp:FileUpload ID="FileUpload1" runat="server" /> <br /> <br /> 8,復選框<br /> 8_1,復選框:<asp:CheckBox ID="CheckBox1" runat="server" Text="籃球" /> <asp:CheckBox ID="CheckBox2" runat="server" Text="足球" /> <br /> 8_2,復選框組:<asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"> <asp:ListItem>籃球</asp:ListItem> <asp:ListItem>足球</asp:ListItem> </asp:CheckBoxList> <br /> <br /> 9,單選框<br /> 9_1,單選框:<asp:RadioButton ID="RadioButton1" runat="server" Text="男" ValidationGroup="sex" /> <asp:RadioButton ID="RadioButton2" runat="server" Text="女" ValidationGroup="sex" /> <br /> 9_2,單選框組:<asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"> <asp:ListItem Selected="True">男</asp:ListItem> <asp:ListItem>女</asp:ListItem> </asp:RadioButtonList> <br /> <br /> 10,下拉框<br /> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>山東</asp:ListItem> <asp:ListItem>河北</asp:ListItem> <asp:ListItem>上海</asp:ListItem> </asp:DropDownList> <br /> <br /> 11,列表框<br /> 11_1,單選,<asp:ListBox ID="ListBox1" runat="server"> <asp:ListItem>山東</asp:ListItem> <asp:ListItem>河北</asp:ListItem> <asp:ListItem>內蒙古</asp:ListItem> </asp:ListBox> 11_2,多選,<asp:ListBox ID="ListBox2" runat="server" SelectionMode="Multiple"> <asp:ListItem>山東</asp:ListItem> <asp:ListItem>河北</asp:ListItem> <asp:ListItem>內蒙古</asp:ListItem> </asp:ListBox> <br /> <br /> 12,面板<br /> <asp:Panel ID="Panel1" runat="server" BackImageUrl="http://images.cnblogs.com/cnblogs_com/ylbtech/403178/o_sanyecao.jpg" Height="200px"> 你好嗎?<br /> <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar> </asp:Panel> <br /> 13,PlaceHolder(像Panel的面板)<br /> <asp:PlaceHolder ID="PlaceHolder1" runat="server"> 你好嗎?<br /> <asp:Calendar ID="Calendar2" runat="server"></asp:Calendar> </asp:PlaceHolder> </div>
1.C,資源下載返回頂部 |
http://files.cnblogs.com/ylbtech/WebForm-BasicControl-HTML.rar
![]() |
作者:ylbtech 出處:http://ylbtech.cnblogs.com/ 本文版權歸作者和博客園共有,歡迎轉載,但未經作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責任的權利。 |