Passing data from one page (within jQuery Dialog) to another
<p>How can I pass a selected value of an element in a jQuery dialog to its parent page?</p>

<p>Page1.aspx</p>

<pre><code>    $(document).ready(function() {
        $("#btnLookUp").click(function() {
            $("#searchActor").dialog({
                autoOpen: "false",
                resizable: "false",
                height: "250",
                width: "320"
            });
        });
    });

    $(document).ready(function() {
        $("#btnSearch").click(function() {
            $("#actorsList").load("LookUp/ActorsList.aspx", { lname: $("#txtSearchCriteria").val() });
        });
        return false;
    });

    function SelectGrid(objValue, itemValue , popUpDialog) {
        $(objValue).val(itemValue);
        $(popUpDialog).dialog("close");                       
    }
</code></pre>

<p>ActorsList.aspx Codebehind</p>

<pre><code>private void LoadActors(string param)
    {
        DataTable dt = new DataTable();
        //Execute stored proc

        Response.Write("&lt;table&gt;");
        foreach (DataRow dr in dt.Rows)
        {
            Response.Write("&lt;tr&gt;");
            Response.Write("&lt;td&gt;" + "&lt;label onclick='SelectGrid(#txtActorId,0,#searchActor'&gt;Select&lt;/label&gt;" + "&lt;/td&gt;");
            Response.Write("&lt;td&gt;" + dr[2].ToString() + "&lt;/td&gt;");
            Response.Write("&lt;td&gt;" + dr[3].ToString() + "&lt;/td&gt;");
            Response.Write("&lt;td&gt;" + dr[4].ToString() + "&lt;/td&gt;");
            Response.Write("&lt;/tr&gt;");
        }
        Response.Write("&lt;/table&gt;");
    }
</code></pre>

<p>`</p>

<p>Also, please help me with this line, I'm having trouble how to assign the value so I just placed it as 0.
<code>Response.Write("&lt;td&gt;" + "&lt;label onclick='SelectGrid(#txtActorId,0,#searchActor'&gt;Select&lt;/label&gt;" + "&lt;/td&gt;");</code></p>
