![]() |
|
|
|||||||
![]() |
ASP Net - Accessing a control within LoginView |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I'm trying out the new membership services in ASP.NET 2.0.
This is a basic question, but how can i access a control within a LoginView ? I want to set the value of a label which is inside the LoggedInTemplate. this.LoginView.LoggedInTemplate Many thanks. Davie |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi Davie,
Welcome to ASPNET newsgroup. Regarding on the accessing a nested control in LoginView control's template question, based on my research, we can do this through the following means: For the LoginView control, when being added onto a page, at a certain time, only one Template (anonymous or loggedIn ) is applied on the Control instance, so at that time, we can only retrieve the reference of those controls in the active template( can't access those in the non-active template). So you can first determine whether the user has been authenticated or not and then use the LoginView.FindControl( stringId) together with the sub control's ID to retrieve the control reference. Thanks & Regards, 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: "Davie" <> | Subject: Accessing a control within LoginView | Date: Sun, 4 Sep 2005 12:20:51 +0100 | Lines: 11 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 | X-RFC2646: Format=Flowed; Original | Message-ID: <> | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: 82-41-9-147.cable.ubr02.edin.blueyonder.co.uk 82.41.9.147 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.aspnet:122262 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | I'm trying out the new membership services in ASP.NET 2.0. | | This is a basic question, but how can i access a control within a LoginView | ? | | I want to set the value of a label which is inside the LoggedInTemplate. | this.LoginView.LoggedInTemplate | | Many thanks. | | | Steven Cheng[MSFT] |
|
|
|
#3 |
|
Posts: n/a
|
Hi Davie,
Does the suggestions in my last reply help you? If there're anything else we can help, please feel free to post here. 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.) -------------------- | X-Tomcat-ID: 81368670 | References: <> | MIME-Version: 1.0 | Content-Type: text/plain | Content-Transfer-Encoding: 7bit | From: (Steven Cheng[MSFT]) | Organization: Microsoft | Date: Mon, 05 Sep 2005 06:22:15 GMT | Subject: RE: Accessing a control within LoginView | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | Message-ID: <S5j#> | Newsgroups: microsoft.public.dotnet.framework.aspnet | Lines: 50 | Path: TK2MSFTNGXA01.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.aspnet:122387 | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 | | Hi Davie, | | Welcome to ASPNET newsgroup. | Regarding on the accessing a nested control in LoginView control's template | question, based on my research, we can do this through the following means: | | For the LoginView control, when being added onto a page, at a certain time, | only one Template (anonymous or loggedIn ) is applied on the Control | instance, so at that time, we can only retrieve the reference of those | controls in the active template( can't access those in the non-active | template). So you can first determine whether the user has been | authenticated or not and then use the LoginView.FindControl( stringId) | together with the sub control's ID to retrieve the control reference. | | Thanks & Regards, | | 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: "Davie" <> | | Subject: Accessing a control within LoginView | | Date: Sun, 4 Sep 2005 12:20:51 +0100 | | Lines: 11 | | X-Priority: 3 | | X-MSMail-Priority: Normal | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 | | X-RFC2646: Format=Flowed; Original | | Message-ID: <> | | Newsgroups: microsoft.public.dotnet.framework.aspnet | | NNTP-Posting-Host: 82-41-9-147.cable.ubr02.edin.blueyonder.co.uk | 82.41.9.147 | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl | | Xref: TK2MSFTNGXA01.phx.gbl | microsoft.public.dotnet.framework.aspnet:122262 | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | | | I'm trying out the new membership services in ASP.NET 2.0. | | | | This is a basic question, but how can i access a control within a | LoginView | | ? | | | | I want to set the value of a label which is inside the LoggedInTemplate. | | this.LoginView.LoggedInTemplate | | | | Many thanks. | | | | | | | | Steven Cheng[MSFT] |
|
|
|
#4 |
|
Posts: n/a
|
Sorry Steven,
I thought I'd posted to this. Your posting helped me out great. Thanks very much! Davie. "Steven Cheng[MSFT]" <> wrote in message news:$... > Hi Davie, > > Does the suggestions in my last reply help you? If there're anything else > we can help, please feel free to post here. 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.) > > -------------------- > | X-Tomcat-ID: 81368670 > | References: <> > | MIME-Version: 1.0 > | Content-Type: text/plain > | Content-Transfer-Encoding: 7bit > | From: (Steven Cheng[MSFT]) > | Organization: Microsoft > | Date: Mon, 05 Sep 2005 06:22:15 GMT > | Subject: RE: Accessing a control within LoginView > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet > | Message-ID: <S5j#> > | Newsgroups: microsoft.public.dotnet.framework.aspnet > | Lines: 50 > | Path: TK2MSFTNGXA01.phx.gbl > | Xref: TK2MSFTNGXA01.phx.gbl > microsoft.public.dotnet.framework.aspnet:122387 > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 > | > | Hi Davie, > | > | Welcome to ASPNET newsgroup. > | Regarding on the accessing a nested control in LoginView control's > template > | question, based on my research, we can do this through the following > means: > | > | For the LoginView control, when being added onto a page, at a certain > time, > | only one Template (anonymous or loggedIn ) is applied on the Control > | instance, so at that time, we can only retrieve the reference of those > | controls in the active template( can't access those in the non-active > | template). So you can first determine whether the user has been > | authenticated or not and then use the LoginView.FindControl( stringId) > | together with the sub control's ID to retrieve the control reference. > | > | Thanks & Regards, > | > | 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: "Davie" <> > | | Subject: Accessing a control within LoginView > | | Date: Sun, 4 Sep 2005 12:20:51 +0100 > | | Lines: 11 > | | X-Priority: 3 > | | X-MSMail-Priority: Normal > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 > | | X-RFC2646: Format=Flowed; Original > | | Message-ID: <> > | | Newsgroups: microsoft.public.dotnet.framework.aspnet > | | NNTP-Posting-Host: 82-41-9-147.cable.ubr02.edin.blueyonder.co.uk > | 82.41.9.147 > | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl > | | Xref: TK2MSFTNGXA01.phx.gbl > | microsoft.public.dotnet.framework.aspnet:122262 > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet > | | > | | I'm trying out the new membership services in ASP.NET 2.0. > | | > | | This is a basic question, but how can i access a control within a > | LoginView > | | ? > | | > | | I want to set the value of a label which is inside the > LoggedInTemplate. > | | this.LoginView.LoggedInTemplate > | | > | | Many thanks. > | | > | | > | | > | > | > Davie |
|
|
|
#5 |
|
Posts: n/a
|
My pleasure
Enjoying Whidbey! 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: "Davie" <> | References: <> <S5j#> <$> | Subject: Re: Accessing a control within LoginView | Date: Fri, 9 Sep 2005 11:34:54 +0100 | Lines: 109 | 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: <> | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: 82-41-9-147.cable.ubr02.edin.blueyonder.co.uk 82.41.9.147 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.aspnet:123385 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Sorry Steven, | | I thought I'd posted to this. Your posting helped me out great. | | Thanks very much! | | Davie. | | "Steven Cheng[MSFT]" <> wrote in message | news:$... | > Hi Davie, | > | > Does the suggestions in my last reply help you? If there're anything else | > we can help, please feel free to post here. 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.) | > | > -------------------- | > | X-Tomcat-ID: 81368670 | > | References: <> | > | MIME-Version: 1.0 | > | Content-Type: text/plain | > | Content-Transfer-Encoding: 7bit | > | From: (Steven Cheng[MSFT]) | > | Organization: Microsoft | > | Date: Mon, 05 Sep 2005 06:22:15 GMT | > | Subject: RE: Accessing a control within LoginView | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | > | Message-ID: <S5j#> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet | > | Lines: 50 | > | Path: TK2MSFTNGXA01.phx.gbl | > | Xref: TK2MSFTNGXA01.phx.gbl | > microsoft.public.dotnet.framework.aspnet:122387 | > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122 | > | | > | Hi Davie, | > | | > | Welcome to ASPNET newsgroup. | > | Regarding on the accessing a nested control in LoginView control's | > template | > | question, based on my research, we can do this through the following | > means: | > | | > | For the LoginView control, when being added onto a page, at a certain | > time, | > | only one Template (anonymous or loggedIn ) is applied on the Control | > | instance, so at that time, we can only retrieve the reference of those | > | controls in the active template( can't access those in the non-active | > | template). So you can first determine whether the user has been | > | authenticated or not and then use the LoginView.FindControl( stringId) | > | together with the sub control's ID to retrieve the control reference. | > | | > | Thanks & Regards, | > | | > | 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: "Davie" <> | > | | Subject: Accessing a control within LoginView | > | | Date: Sun, 4 Sep 2005 12:20:51 +0100 | > | | Lines: 11 | > | | X-Priority: 3 | > | | X-MSMail-Priority: Normal | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 | > | | X-RFC2646: Format=Flowed; Original | > | | Message-ID: <> | > | | Newsgroups: microsoft.public.dotnet.framework.aspnet | > | | NNTP-Posting-Host: 82-41-9-147.cable.ubr02.edin.blueyonder.co.uk | > | 82.41.9.147 | > | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl | > | | Xref: TK2MSFTNGXA01.phx.gbl | > | microsoft.public.dotnet.framework.aspnet:122262 | > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | > | | | > | | I'm trying out the new membership services in ASP.NET 2.0. | > | | | > | | This is a basic question, but how can i access a control within a | > | LoginView | > | | ? | > | | | > | | I want to set the value of a label which is inside the | > LoggedInTemplate. | > | | this.LoginView.LoggedInTemplate | > | | | > | | Many thanks. | > | | | > | | | > | | | > | | > | | > | | | Steven Cheng[MSFT] |
|
|
|
#6 |
|
Junior Member
Join Date: Sep 2007
Posts: 2
|
Thanks. It helped a lot. It just logical.
Petulka77 |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to control the height of a Drop down control | Siri_y | Software | 1 | 05-17-2009 06:19 AM |
| Mind Control and CIA'S BOURNE IDENTITY PLOT | soleilmavis@gmail.com | DVD Video | 2 | 08-03-2007 09:54 PM |
| Ajax Atlas not working in User Control | faiq | Software | 0 | 09-16-2006 08:28 AM |
| Charter Communications -- mind control | Laura | DVD Video | 0 | 01-28-2006 03:14 AM |
| FS: JP1 cable to program your universial remote control, now youcan control anything you want! | Mike | DVD Video | 0 | 07-15-2005 02:46 AM |