我定義了個控件db.ascx
裡面就隻有2個TextBox
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox id="TextBox2" runat="server"></asp:TextBox>
--------------------------------------------------------
我有一個主頁面test.aspx 裡面調用了上面的控件(還有2個Label)
<%@ Register TagPrefix="uc1" TagName="test1" Src="../control/test1.ascx" %>
<uc1:test1 id="Test11" runat="server"></uc1:test1>
<asp:Label id="Label1" runat="server">Label</asp:Label>
<asp:Label id="Label2" runat="server">Label</asp:Label>
----問題
我如何把控件上的值分別傳遞給Label1,Label2???
1》在控件上db.ascx上的後台代碼怎麼編寫??
2》在主頁面test.aspx上面又應該怎麼賦值給2個Label??