By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,079 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,079 IT Pros & Developers. It's quick & easy.

Passing LOGON USER to the DB

P: n/a
How can i send LOGON_USER or User.Identity.Name to the Database?
I'm working on a survey which is intranet based with Windows
Authentication.
I can get the current user by calling LOGON_USER or User.Identity.Name !
But i want to pass(the current user) to a table in DB!
I was thinking of ussing hidden textboxes like so :-
Is it a good approach..
Any ideas appreciated!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Patrick, you question is actually fairly broad. Perhaps you can narrow
in on some specifics.

It sounds like you're able to access the current user information without
problem, so I'm assuming your question is database related.

What are you attempting to accomplish with the current user name and your
database?
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:OI**************@TK2MSFTNGP15.phx.gbl...
How can i send LOGON_USER or User.Identity.Name to the Database?
I'm working on a survey which is intranet based with Windows
Authentication.
I can get the current user by calling LOGON_USER or User.Identity.Name !
But i want to pass(the current user) to a table in DB!
I was thinking of ussing hidden textboxes like so :-
Is it a good approach..
Any ideas appreciated!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2

P: n/a
Thanks MWells for the reply.
Exactly i can get the current user but i want to send the current user data
to the database.
I was thinking of using hidden input t text box like so
<input type="hidden" runat="server">
So what i want to do is at the end of the SURVEY(by clicking the submit
button) i want to capture the current user USING WINDOWS
AUTH(<%=User.Identity.Name%> and then send it to a table in the database!
Hope it is clear..



How can i send LOGON_USER or User.Identity.Name to the Database?
I'm working on a survey which is intranet based with Windows
Authentication.
I can get the current user by calling LOGON_USER or User.Identity.Name !
But i want to pass(the current user) to a table in DB!
I was thinking of ussing hidden textboxes like so :-
<input type="hidden" runat=server>
Is it a good approach..???
** I want the SUBMIT button at the end of the survey to send the LOGON_USER
(using LOGON_USER or User.Identity.Name) to a table in the database!
Any ideas appreciated!
Pls forward any resources available!


"MWells" <outbound__at_sygnal.com> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
Hi Patrick, you question is actually fairly broad. Perhaps you can narrow
in on some specifics.

It sounds like you're able to access the current user information without
problem, so I'm assuming your question is database related.

What are you attempting to accomplish with the current user name and your
database?
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:OI**************@TK2MSFTNGP15.phx.gbl...
How can i send LOGON_USER or User.Identity.Name to the Database?
I'm working on a survey which is intranet based with Windows
Authentication.
I can get the current user by calling LOGON_USER or User.Identity.Name !
But i want to pass(the current user) to a table in DB!
I was thinking of ussing hidden textboxes like so :-
Is it a good approach..
Any ideas appreciated!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 19 '05 #3

P: n/a
Pretty much all you're facing, then, is getting your data into the database.
I don't see how a hidden field would give you any value; you just take
User.Identity.Name, and insert it into your database.

Take a look at the System.Data namespace; for example if you're using Sql
Server, you'll be using System.Data.SqlClient. The specifics of how and
when you do the insert are driven by your database schema and how your
business logic is organized.
"Patrick.O.Ige" <pa********@acn.waw.pl> wrote in message
news:#d**************@TK2MSFTNGP09.phx.gbl...
Thanks MWells for the reply.
Exactly i can get the current user but i want to send the current user data to the database.
I was thinking of using hidden input t text box like so
<input type="hidden" runat="server">
So what i want to do is at the end of the SURVEY(by clicking the submit
button) i want to capture the current user USING WINDOWS
AUTH(<%=User.Identity.Name%> and then send it to a table in the database!
Hope it is clear..



How can i send LOGON_USER or User.Identity.Name to the Database?
I'm working on a survey which is intranet based with Windows
Authentication.
I can get the current user by calling LOGON_USER or User.Identity.Name !
But i want to pass(the current user) to a table in DB!
I was thinking of ussing hidden textboxes like so :-
<input type="hidden" runat=server>
Is it a good approach..???
** I want the SUBMIT button at the end of the survey to send the LOGON_USER (using LOGON_USER or User.Identity.Name) to a table in the database!
Any ideas appreciated!
Pls forward any resources available!


"MWells" <outbound__at_sygnal.com> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
Hi Patrick, you question is actually fairly broad. Perhaps you can narrow in on some specifics.

It sounds like you're able to access the current user information without problem, so I'm assuming your question is database related.

What are you attempting to accomplish with the current user name and your database?
"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:OI**************@TK2MSFTNGP15.phx.gbl...
How can i send LOGON_USER or User.Identity.Name to the Database?
I'm working on a survey which is intranet based with Windows
Authentication.
I can get the current user by calling LOGON_USER or User.Identity.Name ! But i want to pass(the current user) to a table in DB!
I was thinking of ussing hidden textboxes like so :-
Is it a good approach..
Any ideas appreciated!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.