Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Accessing a control within LoginView

 
Thread Tools Search this Thread
Old 09-04-2005, 12:20 PM   #1
Default Accessing a control within LoginView


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
  Reply With Quote
Old 09-05-2005, 07:22 AM   #2
Steven Cheng[MSFT]
 
Posts: n/a
Default RE: Accessing a control within LoginView
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]
  Reply With Quote
Old 09-08-2005, 09:34 AM   #3
Steven Cheng[MSFT]
 
Posts: n/a
Default RE: Accessing a control within LoginView
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]
  Reply With Quote
Old 09-09-2005, 11:34 AM   #4
Davie
 
Posts: n/a
Default Re: Accessing a control within LoginView
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
  Reply With Quote
Old 09-09-2005, 12:06 PM   #5
Steven Cheng[MSFT]
 
Posts: n/a
Default Re: Accessing a control within LoginView
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]
  Reply With Quote
Old 09-30-2007, 12:23 AM   #6
Petulka77
Junior Member
 
Join Date: Sep 2007
Posts: 2
Default Thank you
Thanks. It helped a lot. It just logical.


Petulka77
Petulka77 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46