Help needed getting current user via ASP

Soldato
Joined
11 Feb 2004
Posts
4,532
Location
Surrey, UK
I've created a web form which simply mails form data to recipients. However, I want to include the logged on users name.
This code should do it:string strName = HttpContext.Current.User.Identity.Name.ToString();

However, how do I include it in the code below? I need to add it to the line highlighted in yellow. The other lines include values pulled from the web form.

Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strMessage

strFrom=request.form("txtFrom")
strTo=request.form("txtTo")
strSubject = request.form("txtSubject")
strBody=""
strBody=strBody + "Request Name=" + request.form("reqName") + chr(10)
strBody=strBody + "Business Owners=" + request.form("") + chr(10)
strBody=strBody + "Request Owners=" + request.form("reqOwner") + chr(10)
 
You're right - it's classic ASP, my research into finding a solution failed!
I've created an HTML form, on submit, the form data is passed to an ASP page which processed and compiles the email.
I'm guessing I should add the variable to the web form field? Sorry - I'm a bit lost in all this but its expected of me! :)
 
Thanks for the advice guys. I'll post back when I've found a way to get this information. :)
 
Back
Top Bottom