Update textbox value when pop window close

I want to change value of textbox when popup window close, currently i am doing it with session variable but it does not update value without postback event

  'Popup Page Code
Protected Sub GridView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles GridView1.SelectedIndexChanged
    Session("partname") = GridView1.SelectedRow.Cells(2).Text.ToString()
    Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "CloseWindowScript", "window.close();", True)
End Sub

Session value is called in other page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      If (Session("partname") <> Nothing) Then
        txtpartname.Text = Session("partname")
      End If
    End Sub

I want textbox value to change as soon as the popup window close

Answers


When you select a value in dropdown list, save it in a viewstate. and use that viewstate in pageload to set the value of dropdown list.

in button_click event 
//ddl.selectedvalue = "Test";

viewstate["ddlValue"] = ddl.selectedvalue;

 In page_load event

if(viewstate["ddlValue"] != null)

{ddl.selectedvalue = viewstate["ddlValue"].Tostring(); }

From the pop-up window you try storing the value as follows, this is just an example :

Response.Cookies ("ID").Value = TextBox1.Text

When the popup page is closed you can retrieve that value as

IDGet = Request.Cookies("ID").Value

Need Your Help

Jersey resource receiving duplicate requests from Jersey client

tomcat jersey jax-rs jersey-2.0 jersey-client

We recently upgraded from Jersey 1.x to Jersey 2.22.1 on both Server and Clients. We are now seeing intermittently Jersey will make/receive two requests.

Form::file: How to repopulate with Input::old After Validation Errors and/or on Update?

php validation file-upload laravel-4

In my PhotosController, I am trying to modify the edit action so that it shows the existing value in the Form::file() input field (and, so that it repopulates the field if validation fails).