I have a subdomain and im trying to pass the current logged in user name to the page, the subdomain has aspx pages in it, I can request querystring when it gets to the subdomain. In the accountdopdown.cshtml I am adding a option, and would like to if possible do something like <a href"www.somepage.aspx"+User.identity.name> Is this possible, how would I attatch a username to the end of a url I want to navigate to?
Linking user name
#1
Geschrieben: 28 January 2015 - 09:19
#2
Geschrieben: 28 January 2015 - 14:30
<a href="www.somepage.aspx?userName=@(HttpUtility.UrlEncode(User.Identity.Name))">my hyperlink</a>
Marcus Gesing
Smartstore AG
#3
Geschrieben: 28 January 2015 - 17:32
Perfect, Thank you!!!
#4
Geschrieben: 28 January 2015 - 20:11
it rks perfect, but just out of curiosity, would you know how to carry authentication(login) information over to a subdomain? It would be easier to do then use the username such as I am
#5
Geschrieben: 28 January 2015 - 22:09
HTTP cookie.
Marcus Gesing
Smartstore AG
#6
Geschrieben: 28 January 2015 - 23:20
an example perhaps? I don't really know anything about MVC, im n aspx guy lol
#7
Geschrieben: 29 January 2015 - 05:58
I am using the username passed in a query string to the aspx site, then storing that user name in a session variable, not very effective though, would be better if I could use the original information
#8
Geschrieben: 29 January 2015 - 13:16
Marcus Gesing
Smartstore AG
#9
Geschrieben: 29 January 2015 - 23:30
ok perfect, thank you