473,413 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

can I disable a user control in a web page

ron
1. Can I disable a user control in a web page?
2. Can I disable the 'close' function on the top-right corner of a popup
window, so I can use code-behind function to close the browser?
Oct 17 '06 #1
6 10103
1. Yes. All controls have an "enabled" property which can be set to
false.
2. No. Possibly javascript might let you, although I doubt it. You have
to remember that ASP.NET is server side code, which means it can do
stuff on the server like talk to databases. Javascript is client side
code. It can do stuff funky in the browser, muck around with windows,
etc.

ron wrote:
1. Can I disable a user control in a web page?
2. Can I disable the 'close' function on the top-right corner of a popup
window, so I can use code-behind function to close the browser?
Oct 17 '06 #2
ron
Thank you, Steven.

For the second question, I found two methods in javascript:

1. window.open
2. window.showModalDialog

There is no way to disable 'close' function for those methods, do you have
other way to handle that?

"Steven Nagy" wrote:
1. Yes. All controls have an "enabled" property which can be set to
false.
2. No. Possibly javascript might let you, although I doubt it. You have
to remember that ASP.NET is server side code, which means it can do
stuff on the server like talk to databases. Javascript is client side
code. It can do stuff funky in the browser, muck around with windows,
etc.

ron wrote:
1. Can I disable a user control in a web page?
2. Can I disable the 'close' function on the top-right corner of a popup
window, so I can use code-behind function to close the browser?

Oct 17 '06 #3
Hi,

ron wrote:
Thank you, Steven.

For the second question, I found two methods in javascript:

1. window.open
2. window.showModalDialog

There is no way to disable 'close' function for those methods, do you have
other way to handle that?
No way. The browser's interface is protected by strict security,
JavaScript has very little rights to interact with the default chromes.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 17 '06 #4
ron
I did not find 'enabled' property for user control.

"Steven Nagy" wrote:
1. Yes. All controls have an "enabled" property which can be set to
false.
2. No. Possibly javascript might let you, although I doubt it. You have
to remember that ASP.NET is server side code, which means it can do
stuff on the server like talk to databases. Javascript is client side
code. It can do stuff funky in the browser, muck around with windows,
etc.

ron wrote:
1. Can I disable a user control in a web page?
2. Can I disable the 'close' function on the top-right corner of a popup
window, so I can use code-behind function to close the browser?

Oct 17 '06 #5
Ron,

As Laurent suggests, you can't do it.
If you think about it, this is a good thing.
Otherwise every site would be doing it, and no one would ever be able
to close a browser window.

Steven

Oct 17 '06 #6
When you are talking about a user control, you DO mean an ASP.NET user
control right?

Oct 17 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: chavdar | last post by:
I need to inherit web user control page, how can I do this? Thanks, Chavdar
1
by: Barbara Alderton | last post by:
I have the following scenario: I have a user control that contains a registered menu control. The menu and other information on the user control is specific to the user accessing the site. ...
4
by: Mark | last post by:
I am setting up an asp.net site using the Ektron CMS. Every page in the site uses the same basic template, with the look of the page changing via CSS and an id on the body. The id is shared by all...
2
by: Frankie | last post by:
I have a user control into which I insert a bunch of controls dynamically. I have it all working just fine - Everything is there on Postback, etc. I load this user control into a hosting ASPX...
0
by: Shea | last post by:
Is there anyway to disable user controls being alive at design time? I have a user control which is throwing an exception in the constructor, and as such prevents me from loading my solution...
1
by: Dood | last post by:
I have a page that has a tab control which toggles which user control is loaded into a placeholder. The user controls that are loaded into this place holder have other user controls in them, making...
0
by: conckrish | last post by:
Hi all, Can anyone tell me how to add Click event for dynamically created User control page ?? I have a user control page in datagrid cell. when i click this user control page it ll redirect...
6
by: conckrish | last post by:
Hi all Can anyone tell me how to add a click event for a user control page dynamically??? Thanx Krish.
3
by: CodeRazor | last post by:
I have a user contol hosted in a webform. The user control interfaces with an http component. When the user control loads, a request is sent to the http component. It takes around 10 seconds...
1
by: amitsaxena1981 | last post by:
hi, I m creating gridview user control with asp.net2.0 and vb.net.Now i want to apply the some javascript function and html tags in gridview user control.I dont know where i put this...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.