redirecting page issue

I have a one regular aspx page and the another aspx page is has RadWindow.  From the first one, I am opening up Radwindow  aspx page. as a just popup window. Closing Radwindow is no problem with this code below I have on master page.
function Close() {
                var oWindow = GetRadWindow();
                oWindow.argument = null;
                oWindow.close();
            }
 when I use this code below on code behind, it just closes the radwindow and the main aspx page doesnt get refresh at all... Tried several things like Respond.Redirect("mymain.aspx") and Server.Transfer  etc.. What it doesn with those, it redirects to main aspx page in the second aspx page where I have Radwindow .. So, behaving really weird..

Any ideas?
 lblCloseWindow.Text = "<script type='text/javascript'>Close()</" + "script>";
1jawsAsked:
Who is Participating?
 
Ajay SharmaConnect With a Mentor Commented:
In the Close function you need to trigger the page postback.

I aspx page change your function:

function Close()
{
     var oWindow = GetRadWindow();
     oWindow.argument = null;
     oWindow.close();
     __doPostBack('lnkpostback', '');
}


In the code behind file change Page_load :
if (Page.IsPostBack == true && Request["__EVENTTARGET"] != null && Request["__EVENTTARGET"].ToString() == "lnkpostback")
{
    //do your conditional work here
}
0
 
1jawsAuthor Commented:
I replaced lnkpostback with my myMainpage.aspx , is that correct? IF so, than, on code behind page load I had put that too, but that didnt work, didnt postback... Also, I cant have that on page load because where I am calling Close() function on button click event...
0
 
1jawsAuthor Commented:
Dont need that answer anymore.. Thanks though for trying to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.