Question : Modal Window postback opens new windows instead of posting to itself!

I Opened a Modal window using:

function ShowNewPage()
{
window.showModalDialog("Sample.aspx","","width=400;height=200;");
}

On Sample.aspx, I have a web control LinkButton. If I click on it, something weird happened. Instead of post back to the same page (Sample.aspx), it opens another web page in a new window, which is unexpected behavior.

Does anybody know how to fix this problem and let modal web page post back to itself?

Thanks a lot.
Code Snippet:
1:
2:
3:
4:
function ShowNewPage()
{
window.showModalDialog("Sample.aspx",window,"width=400;height=200;");
}

Answer : Modal Window postback opens new windows instead of posting to itself!

How are your code that execute when you want to go back to Modal Window?

In HTML you can add a target="_self" to open in the same window.

Random Solutions  
 
programming4us programming4us