Last post Dec 29, 2011 05:12 AM by Mehboob_hoo
Member
10 Points
53 Posts
Dec 29, 2011 04:30 AM|Mehboob_hoo|LINK
Hi All,
Can anyone tell me how to hide close & maximize button in browser in Asp.Net.
hide
Participant
1340 Points
476 Posts
Dec 29, 2011 04:43 AM|sunilgurjar|LINK
window.open("mypage.html","mywindowname", "toolbar=no,menubar=no");
58 Points
64 Posts
Dec 29, 2011 04:46 AM|pankaj_tiwari1988@yahoo.co.in|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 04:52 AM|Mehboob_hoo|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 04:54 AM|Mehboob_hoo|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
8561 Points
2044 Posts
Dec 29, 2011 05:01 AM|Prashant Kumar|LINK
It cannot be done
Dec 29, 2011 05:05 AM|Mehboob_hoo|LINK
Thanks, ya
Dec 29, 2011 05:06 AM|pankaj_tiwari1988@yahoo.co.in|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 05:12 AM|Mehboob_hoo|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...
Member
10 Points
53 Posts
Hide Close & maximize button in ASP.Net
Dec 29, 2011 04:30 AM|Mehboob_hoo|LINK
Hi All,
Can anyone tell me how to hide close & maximize button in browser in Asp.Net.
hide
Participant
1340 Points
476 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 04:43 AM|sunilgurjar|LINK
read my blog
http://sunilgurjar.blogspot.com/
Member
58 Points
64 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 04:46 AM|pankaj_tiwari1988@yahoo.co.in|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
Member
10 Points
53 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 04:52 AM|Mehboob_hoo|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');
Member
10 Points
53 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 04:54 AM|Mehboob_hoo|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
8561 Points
2044 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 05:01 AM|Prashant Kumar|LINK
It cannot be done
hide
Member
10 Points
53 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 05:05 AM|Mehboob_hoo|LINK
Thanks, ya
Member
58 Points
64 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 05:06 AM|pankaj_tiwari1988@yahoo.co.in|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
Member
10 Points
53 Posts
Re: Hide Close & maximize button in ASP.Net
Dec 29, 2011 05:12 AM|Mehboob_hoo|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...