how to maximize the browser window of an asp.net application - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how to maximize the browser window of an asp.net application

v_j_lathav_j_latha Posts: 26Member
hai

i want to know that how to maximize the browser window of an asp.net application

when we browse through the network browser,the window state will be at
maximised state but when i run an ASP.net application it won't run as such.

plz help,
thanks in advance.

Comments

  • iwilld0itiwilld0it Posts: 1,134Member
    : hai
    :
    : i want to know that how to maximize the browser window of an asp.net application
    :
    : when we browse through the network browser,the window state will be at
    : maximised state but when i run an ASP.net application it won't run as such.
    :
    : plz help,
    : thanks in advance.
    :

    You'll have to use JavaScript to simulate that. Look into the Window.Open() function on the internet. To mess with the actual behavior of the browser is impossible, as far as I know. You might be able to accomplish it with a DHTML behavior, but that is Internet Explorer specific.
  • mangesh004mangesh004 Posts: 4Member
    Hi friend
    there is no way through which you can maximize the browser window but there is one mid way through which browser will fit in the whole screen.
    but that even possible only through Java script, it can be done as follows


    top.window.moveTo(0,0);
    if (document.all) {
    top.window.resizeTo(screen.availWidth,screen.availHeight);
    }
    else if (document.layers||document.getElementById) {
    if (top.window.outerHeight

    Put this code in the HTML view of your page or the code behind.
    If you have any problem implementing it into code behind plz feel free to ask.

    Thanking you,
    Mangesh
  • v_j_lathav_j_latha Posts: 26Member
    : Hi friend
    : there is no way through which you can maximize the browser window but there is one mid way through which browser will fit in the whole screen.
    : but that even possible only through Java script, it can be done as follows
    :
    :
    : top.window.moveTo(0,0);
    : if (document.all) {
    : top.window.resizeTo(screen.availWidth,screen.availHeight);
    : }
    : else if (document.layers||document.getElementById) {
    : if (top.window.outerHeight
    :
    : Put this code in the HTML view of your page or the code behind.
    : If you have any problem implementing it into code behind plz feel free to ask.
    :
    : Thanking you,
    : Mangesh
    :
    thanks for the help
    but i don't scriting
    iam learning asp.net .will u able to provide the same code in Visual Basic ?

    tks again
    have a nice day


  • iwilld0itiwilld0it Posts: 1,134Member
    : : Hi friend
    : : there is no way through which you can maximize the browser window but there is one mid way through which browser will fit in the whole screen.
    : : but that even possible only through Java script, it can be done as follows
    : :
    : :
    : : top.window.moveTo(0,0);
    : : if (document.all) {
    : : top.window.resizeTo(screen.availWidth,screen.availHeight);
    : : }
    : : else if (document.layers||document.getElementById) {
    : : if (top.window.outerHeight
    : :
    : : Put this code in the HTML view of your page or the code behind.
    : : If you have any problem implementing it into code behind plz feel free to ask.
    : :
    : : Thanking you,
    : : Mangesh
    : :
    : thanks for the help
    : but i don't scriting
    : iam learning asp.net .will u able to provide the same code in Visual Basic ?
    :
    : tks again
    : have a nice day
    :
    :
    :

    There is no visual basic equivalent ... you have to use that JavaScript in order to get the functionality you want. It is an unfortunate side-effect of ASP.NET being server-side.



  • kernelv12kernelv12 Posts: 1Member
    Hi,
    : There is no visual basic equivalent ... you have to use that JavaScript in order to get the functionality you want. It is an unfortunate side-effect of ASP.NET being server-side.

    True so...but you can use RegisterClientScriptBlock if you're not familiar with HTML, and you don't want to mess around with your app's html source. You could try the following (for ex. in the Page_Load section of you VB code):

    RegisterClientScriptBlock("", "top.window.moveTo(0,0); top.window.resizeTo(screen.availWidth,screen.availHeight);")


  • v_j_lathav_j_latha Posts: 26Member
    : Hi,
    : : There is no visual basic equivalent ... you have to use that JavaScript in order to get the functionality you want. It is an unfortunate side-effect of ASP.NET being server-side.
    :
    : True so...but you can use RegisterClientScriptBlock if you're not familiar with HTML, and you don't want to mess around with your app's html source. You could try the following (for ex. in the Page_Load section of you VB code):
    :
    : RegisterClientScriptBlock("", "top.window.moveTo(0,0); top.window.resizeTo(screen.availWidth,screen.availHeight);")
    :
    :
    :
    hai friend
    tnk u very very much
    i worked
    i wrote it in page_init event so the code executes before the page executes

    i was very upset regarding this prb
    tnk u once again
    it really helped me

    bye
    have a nice day

  • PKSpencePKSpence Posts: 2Member
    Outstanding, m8! Exactly what I was looking for!
  • PKSpencePKSpence Posts: 2Member
    Outstanding, m8! Exactly what I was looking for!
Sign In or Register to comment.