Hello folks,

I have a small popup widow that gets launched successfully using the following code:

Code in the page that launches the popup window:
Code:
function OpenWindow_HistoricalRuns() {           
            
            var windowIncsimHistRuns = window.open('MVal.aspx', 'Market', 'width=350,height=425,scrollbars=0');

            windowIncsimHistRuns.moveTo(500, 300);

        }
When the popup window is launched successfully I am actually storing a value "Market" in a hidden text box as shown below:

Code:
function SetDisplay() {

              document.getElementById('<%=TextBoxSourcePageName.ClientID%>').value = window.parent.name;
             
          }
Now in the Page_LOad event of the popup window, I want to see what is stored in the hidden text box control (TextBoxSourcePageName). I am using the following asp.net c# code in the Page_load event. But I don't get anything even though the hidden control has the text "Market".

Code:
protected void Page_Load(object sender, EventArgs e)
        {

            if (!this.IsPostBack)
            {
                try
                {
                    if (TextBoxSourcePageName.Text == "MarketVal")
               }
           }
        }