Dear All...

I have two aspx Pages..I am having first page as a home page.I have various controls bounded in the home page.when i click the button control in the home Page,the Second Page is opened but it is Opening in an new window..Instead i need the second Page to be opened in the same window(i.e the second Page should mask the home Page)..
I am using javascript code to redirect..The code is as follows...
window.open("page2.aspx?username=" + lstruser)

I need script to redirect..
Someone help in this Regard...

Regards,
Balagurunathan s

window.open opens in a new window.
use document.location to load a new page in same window

of course it is opening in a new window, you are using window.open.

use

document.location = "page2.aspx?username=" + lstruser
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.