How to open a web page in Maximized form in asp.net c# webapplication

This is related to asp.net question.

You cannot maximize the browser window through either server side or client code. But there is a work around solution throuh which browser will fit in the whole screen.

Put the following code on page load event of your .aspx page.

protected void Page_Load(object sender, EventArgs e)
    {

       Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "maximizeScript", "top.window.moveTo(0,0); top.window.resizeTo(screen.availWidth,screen.availHeight);", true);

    }
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.