Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 29, 2011 09:12 AM by Mehboob_hoo
Member
50 Points
55 Posts
Dec 29, 2011 08:30 AM|LINK
Hi All,
Can anyone tell me how to hide close & maximize button in browser in Asp.Net.
hide
Contributor
2252 Points
478 Posts
Dec 29, 2011 08:43 AM|LINK
window.open("mypage.html","mywindowname", "toolbar=no,menubar=no");
100 Points
65 Posts
Dec 29, 2011 08:46 AM|LINK
Mehboob_hoo Can anyone tell me how to hide close & maximize button in browser in Asp.Net.
No You can't control browser buttons, optional you can use a model pop up window in which you can customize.
Dec 29, 2011 08:52 AM|LINK
Thanks for qucik reply,i had tried your approach but still my close & maximize button shown in browser.i wrote like
window.open("AdvSetup/Adv_set_prd.aspx?Prd_ID=" + prd_id, null, 'left=50, top=50, height=750, width= 1124,toolbars=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=yes');
Dec 29, 2011 08:54 AM|LINK
Actually i wanat to force the user to click on close button, rather than browser close button, infact i wana to write some custome code before closing,
Can i do this on page Unloading or something like that
Star
12334 Points
1992 Posts
Dec 29, 2011 09:01 AM|LINK
It cannot be done
Dec 29, 2011 09:05 AM|LINK
Thanks, ya
Dec 29, 2011 09:06 AM|LINK
You can write your custom code in javascript which will fired on click of close button of browser.
Refer this;
http://www.codeproject.com/Questions/93831/Confirm-from-user-before-closing-the-browser-windo
Dec 29, 2011 09:12 AM|LINK
Thanks alot. its worked for me,i will call a page method from here to do my custom code.
window.onbeforeunload =function () {
alert('Done');
PageMethods.CreateHTMLFiles();
}
Thanks alottttttttttt...
Mehboob_hoo
Member
50 Points
55 Posts
Hide Close & maximize button in ASP.Net
Dec 29, 2011 08:30 AM|LINK
Hi All,
Can anyone tell me how to hide close & maximize button in browser in Asp.Net.
hide
sunilgurjar
Contributor
2252 Points
478 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 08:43 AM|LINK
read my blog
http://sunilgurjar.blogspot.com/
pankaj_tiwar...
Member
100 Points
65 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 08:46 AM|LINK
No You can't control browser buttons, optional you can use a model pop up window in which you can customize.
Pankaj Tiwari | Gtalk: pktiwari1988
Mehboob_hoo
Member
50 Points
55 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 08:52 AM|LINK
Thanks for qucik reply,i had tried your approach but still my close & maximize button shown in browser.i wrote like
window.open("AdvSetup/Adv_set_prd.aspx?Prd_ID=" + prd_id, null, 'left=50, top=50, height=750, width= 1124,toolbars=no,menubar=no,location=no,scrollbars=yes,resizable=yes,status=yes');
Mehboob_hoo
Member
50 Points
55 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 08:54 AM|LINK
Actually i wanat to force the user to click on close button, rather than browser close button, infact i wana to write some custome code before closing,
Can i do this on page Unloading or something like that
Prashant Kum...
Star
12334 Points
1992 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 09:01 AM|LINK
It cannot be done
hide
Mehboob_hoo
Member
50 Points
55 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 09:05 AM|LINK
Thanks, ya
pankaj_tiwar...
Member
100 Points
65 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 09:06 AM|LINK
You can write your custom code in javascript which will fired on click of close button of browser.
Refer this;
http://www.codeproject.com/Questions/93831/Confirm-from-user-before-closing-the-browser-windo
Pankaj Tiwari | Gtalk: pktiwari1988
Mehboob_hoo
Member
50 Points
55 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 09:12 AM|LINK
Thanks alot. its worked for me,i will call a page method from here to do my custom code.
window.onbeforeunload =function () {
alert('Done');
PageMethods.CreateHTMLFiles();
}
Thanks alottttttttttt...