|
本人学习.net用户控件的过程:如何读取子控件的值,自定义事件,动态控制子控件的状态,附带例子。 关于Web用户控件如何读取子控件的值,自定义事件,动态控制子控件状态的应用。 效果图: 
/*用户控件界面开始*/ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchBar.ascx.cs" Inherits="Singcn.UC.SearchBar" %> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="coolBar"> <tr> <td style="WIDTH: 3px; CURSOR: move; height: 26px;"><DIV CLASS="TBHandle"></DIV></TD> <td style="height: 26px"> 查询:<asp:TextBox ID="search_txt" runat="server" CssClass="TextBox" Width="120px"></asp:TextBox> <asp:DropDownList ID="search_lx" runat="server"> </asp:DropDownList> <asp:Button ID="BOk" runat="server" CssClass="Button" Text="查询" OnClick="BOk_Click"/> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></td> </tr> </table> /*用户控件界面结束*/ /*用户控件代码开始*/ namespace MY.UC { using System; using System.Data; using System.Co [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|