Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am quite new with ASP.net. I have a parent page where it can call a pop-up window. At the pop-up window you can browse for folder path, and click OK button to pass it back to the parent page where the folder path is displayed in a text box. I am trying to use Session but I cannot figure out how to post it back to the parent page. Here is the code from the Page_load of the parent

C#
protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                'this.txtRaw.Text = ADSclass.filePath.ToString();
            }
        }


this is the code from the pop-up window
C#
protected void _selectButton_Click(object sender, EventArgs e)
        {
          Session["path"] = this._browseTextBox.Text.ToString();
          ADSclass.filePath = this._browseTextBox.Text.ToString();//this is a public variable that I declared in a class
        }


Any help will do :)
Posted

1 solution

Why use Session when you can do it directly using new window's return value.
This article will guide: Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900