473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

get user identity in user control

I've created a simple function to capture the userid when a page is hit. I
can include this function in the page load using if not ispostback, but i'd
perfer to place it in the page load event of the user control i have created
for navigation. However, the user object does not appear to be available. Is
there a way around this? or am i doing something wrong?

(additional note: i also tried putting it in the global.asax but get an
error.)
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
Nov 19 '05 #1
3 2615
Parent.Page

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"WebBuilder451" wrote:
I've created a simple function to capture the userid when a page is hit. I
can include this function in the page load using if not ispostback, but i'd
perfer to place it in the page load event of the user control i have created
for navigation. However, the user object does not appear to be available. Is
there a way around this? or am i doing something wrong?

(additional note: i also tried putting it in the global.asax but get an
error.)
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes

Nov 19 '05 #2
Kes,

Check your include files/references in the regular .aspx page. Whichever
object you're using to obtain user identity is being referenced by the .aspx
page, but not by the user control. Also, in case the object is already being
referenced by the user control (which is likely) try creating it via it's
full path name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
I've created a simple function to capture the userid when a page is hit. I
can include this function in the page load using if not ispostback, but
i'd
perfer to place it in the page load event of the user control i have
created
for navigation. However, the user object does not appear to be available.
Is
there a way around this? or am i doing something wrong?

(additional note: i also tried putting it in the global.asax but get an
error.)
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes

Nov 19 '05 #3
I guess i was hoping the user control would have access to the user identity
after it was included on the page. this would save me from calling the
function (created as component) on each aspx page in the site. So far the
user is found on each page with out problem even when it does not exist (as
Null or blank). however, i can't help feeling i'm missing something.

page pg1.aspx has control uctrl1.ascx (as does all other pages on the site).
With out directly referencing pg1.aspx can i get the user identity?
thanks
kes

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"S. Justin Gengo" wrote:
Kes,

Check your include files/references in the regular .aspx page. Whichever
object you're using to obtain user identity is being referenced by the .aspx
page, but not by the user control. Also, in case the object is already being
referenced by the user control (which is likely) try creating it via it's
full path name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
I've created a simple function to capture the userid when a page is hit. I
can include this function in the page load using if not ispostback, but
i'd
perfer to place it in the page load event of the user control i have
created
for navigation. However, the user object does not appear to be available.
Is
there a way around this? or am i doing something wrong?

(additional note: i also tried putting it in the global.asax but get an
error.)
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dave | last post by:
I have an application/component that updates an individual's active directory information. The current application finds the active directory entry via the following.. Dim entry As DirectoryEntry...
4
by: Ben R. | last post by:
Hello, I've got a text-based .inc file that I'm using for my asp.net site's header. I thought about a user control, but if possible, I'd like to avoid it for simplicity's sake. In the main page,...
5
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to...
8
by: Razak | last post by:
Hi, I have a class which basically do Impersonation in my web application. From MS KB sample:- ++++++++++++++++++++code starts Dim impersonationContext As...
0
by: jakobsgaard | last post by:
It is possible to Map a certificate to a Active Directory User Account from DotNet? Please provide an example. Best regards, Ejnar Jakobsgaard...
5
by: Shimon Sim | last post by:
I am working with LogIn control and need to set some property for profile after user is authenticated. I thought that LoggedIn event is the right place but system tells me that the property can't...
3
by: Asaf | last post by:
Hello, I have created a web service name "TestWS" and published it to my SBS2003 server that uses IIS6 as a web server. I have set NO anonymous access to TestWS virtual directory and I have...
0
by: kkos | last post by:
I noticed the following issue posted as a double-hop issue in many discussion boards but found no answers that explain how to pass the second hop with windows auth from IIS ASPX page to remote SQL...
3
by: =?Utf-8?B?TWFyY0c=?= | last post by:
I have a Server.Transfer in my asp:Login LoggedIn event handler. I am forcing transfer to a specific page since I do not want to use the ReturnURL that is in Request.Params (i.e., the user...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.