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)
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)