Hi Bryan,
As for your scenario, the Previous Page's control hierarchy is very
complex, I'd suggest that we first define a public property in the previous
page's page class to expose that certain inner control. for example:
=============== =
public Label InnerLabel
{
get
{
WebPart hw = WebPartZone1.We bParts[0];
UserControl uc = hw.FindControl( "HelloWorld 1") as UserControl;
Label lbl = uc.FindControl( "lblMessage ") as Label;
return lbl ;
}
}
=============== ===
then, you can access this propety in the perviouspage instance (through
reflection or strong typed instance) in the target post page's code.
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.)
--------------------
| From: "Bryan" <Br*****@nospam .nospam>
| References: <#M************ **@tk2msftngp13 .phx.gbl>
<97************ *************** *******@microso ft.com>
| Subject: Re: Cross Page posting problems asp.net 2.0
| Date: Thu, 20 Oct 2005 11:55:59 -0700
| Lines: 49
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <Ou************ *@tk2msftngp13. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 208-46-205-150.dia.cust.qw est.net 208.46.205.150
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:1328 42
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| True, but I was just trying to use the new functionality in 2.0.
|
| If anyone can help using cross page posting using 2.0 that would be great!
|
| Thanks!
| Bryan
|
|
| "Curt_C [MVP]" <software_at_da rkfalz.com> wrote in message
| news:97******** *************** ***********@mic rosoft.com...
| > store the value in the page postback (session, db, etc) and then read
it
| > in
| > on page2.
| > --
| > Curt Christianson
| > site:
http://www.darkfalz.com
| > blog:
http://blog.darkfalz.com
| >
| >
| >
| > "Bryan" wrote:
| >
| >> I am trying to get to a label control to get its Text value. from a
| >> previous
| >> page.
| >>
| >> The label control is buried in a Web User Control that is in a
webpart
| >> zone. When I use this code:
| >> foreach(Control c in PreviousPage.Co ntrols)
| >> {
| >> and try to find the control here.
| >>
| >> }
| >>
| >> I can only see the masterpage, then another loop inside that gets me
some
| >> literal controls etc.
| >>
| >> I cannot even find the Web Part Zone! Please help, is there an easier
way
| >> to
| >> do this?
| >>
| >> Thanks,
| >> Bryan
| >>
| >>
| >>
| >>
|
|
|