Im trying to redirect a user to a new page in which there username will be displayed within a text box. I am using ASP.NET Loginname and Buttons to do this. My issue is that im not 100% sure on how to get the value from the LoginName into the javascript which needs this. I have no way to get into the server code so this all has to be done by SharePoint designer I know the common way is to do something like this
window.location="http://mysite/default.aspx?u="+ LoginName1
But this seems it doesn't want to work. Any answers?
JavaScript Code
function Redirect()
{
window.location="http://mysite/default.aspx";
}
ASP.NET Code
<asp:Button runat="server" Text="To Sysomos" id="Button1" OnClientClick="if (!Redirect()) { return false;};"></asp:Button>
<asp:LoginName runat="server" id="LoginName1" ></asp:LoginName>