Hi Betty,
As for accessing the Usercontrol's states in page code, you can consider
the suggestion I also posted in your another thread in this groups:
Subject: how to access user control in aspx file
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
We can programmaticall y access them like:
(check the control's type to see whether they're of the expected
usercontrol's type):
=============== ======
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArg s) Handles Me.Load
Dim form1 As HtmlForm = Page.FindContro l("form1")
Dim ctrl As Control
For Each ctrl In form1.Controls
Response.Write( "<br>" & ctrl.GetType(). ToString())
Next
End Sub
=============== =======
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: how to access a group of controls?
| thread-index: AcYXF25iFyBvK4Y yTVeTI9DD4bvaqw ==
| X-WBNR-Posting-Host: 64.253.156.46
| From: "=?Utf-8?B?UGhpbGxpcCB XaWxsaWFtcw==?= "
<Ph************ **@webswapp.com >
| References: <98************ *************** *******@microso ft.com>
| Subject: RE: how to access a group of controls?
| Date: Wed, 11 Jan 2006 17:28:03 -0800
| Lines: 48
| Message-ID: <E8************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3702 30
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Consider every control to be able to process the user input and commands
by
| either 1) handling its own events, or 2) raising an event per request for
| action to be handled by the container class (the page).
| --
| HTH,
| Phillip Williams
|
http://www.societopia.net
|
http://www.webswapp.com
|
|
| "c676228" wrote:
|
| > Hi,
| > I created a group of user controls in an aspx form.
| > which is as follow:
| >
| > <body>
| > <form id="Form1" method="post" runat="server">
| > <SUBWAY:PEOPLEI NFO id="Peopleinfo0 " runat="server"
Caption="Depend ent
| > Information"></SUBWAY:PEOPLEIN FO>
| > <p></p>
| > <SUBWAY:PEOPLEI NFO id="Peopleinfo1 " runat="server"
Caption="Depend ent
| > Information"></SUBWAY:PEOPLEIN FO>
| > <p></p>
| > <SUBWAY:PEOPLEI NFO id="Peopleinfo2 " runat="server"
Caption="Depend ent
| > Information"></SUBWAY:PEOPLEIN FO>
| > <p></p>
| > <SUBWAY:PEOPLEI NFO id="Peopleinfo3 " runat="server"
Caption="Depend ent
| > Information"></SUBWAY:PEOPLEIN FO>
| > <p></p>
| > <SUBWAY:PEOPLEI NFO id="Peopleinfo4 " runat="server"
Caption="Depend ent
| > Information"></SUBWAY:PEOPLEIN FO>
| > <p></p>
| > <SUBWAY:PEOPLEI NFO id="Peopleinfo5 " runat="server"
Caption="Depend ent
| > Information"></SUBWAY:PEOPLEIN FO>
| > <p><asp:label id="Label1" style="Z-INDEX: 150; LEFT: 80px; POSITION:
| > absolute; TOP: 450px" runat="server"> label</asp:label><asp: button
| > id="Submit1" style="Z-INDEX: 102; LEFT: 72px; POSITION: absolute; TOP:
420px"
| > onclick="button _click"
| > runat="server" Text="Submit"></asp:button></p>
| > </form>
| > </body>
| > But I don't know how to write efficient codes to collect data from this
| > group of user controls, maybe I created in a very silly way, can you
give me
| > a hint?
| > Thanks.
| > --
| > Betty
|