Hi Sudhir,
Well, it is better way, I forgot this way, but you may know, window.location.replace is forcing on client side, not server side, so if target page has back or return button, they does not work well, if so, you can use window.location.href.
Regards,
Jerry