Does anyone see what im doing wrong here, i get the value undefined if i try to reference the query string;
strUserName = Convert.ToString(Session["Username"]);
Please note that lblUserName is a label, it seem to work only when i use a textbox
function QuestionOpenWindow(strIndex)
{
var strUsername = document.getElementById('<%=lblUserName.ClientID%>').value;
MyWindow1 = window.open("frmQuestionType.aspx?ID=" + strIndex + "&strUsername=" + strUsername ,"", "location=0,status=0,scrollbars=0,width=600,height=500");
MyWindow1.moveTo(320,150);
}
strUserName = Convert.ToString(Session["Username"]);
Please note that lblUserName is a label, it seem to work only when i use a textbox
function QuestionOpenWindow(strIndex)
{
var strUsername = document.getElementById('<%=lblUserName.ClientID%>').value;
MyWindow1 = window.open("frmQuestionType.aspx?ID=" + strIndex + "&strUsername=" + strUsername ,"", "location=0,status=0,scrollbars=0,width=600,height=500");
MyWindow1.moveTo(320,150);
}