The prompt appears because you are attempting to close a parent window that may or may not have children windows open. If you opened the window with "window.open()" and then used "window.close()" on the new window, you'll notice that there is no prompt. This is a browser setting that can't be changed. -BC
Brian M C
Posts
-
about java script -
Which control triggered postback eventIt depends on where you are trying to gain access to this information and what you hope to achieve. Obtaining the ID of the control that raised the event is easy enough to do in the Click event of a LinkButton control. Just cast the "sender" as a LinkButton and use the ID property. -BC
-
webControls?You need to create a "Composite Control" in order to add an ImageButton web control to your custom control. You'll need to override the "CreateChildControls" protected method of the WebControl parent and add the ImageButton control to your control's "ControlCollection". Here's an example... private ImageButton myImage; protected override void CreateChildControls() { this.myImage = new ImageButton(); this.myImage.ID = "myImage"; this.myImage.ImageUrl = "Images/myImage.gif"; this.Controls.Add( myImage ); } In your render method you just call this.myImage.Render( output ); and the control will be rendered to the page. HTH, -BC
-
Dropdownlist selected itm changeSet the AutoPostBack event to true and provide an event handler that subscribes to the SelectedIndexChanged event. -BC
-
Accessing client's hardware from a Web BrowserYou cannot access a client's hardware devices through a browser without some sort of ActiveX component. If you could, I wouldn't browser the Internet. -BC
-
Composite, webControl, CustomControl?A WebControl is the parent object to a composite control. A composite control is a type of custom control. A composite control, as defined by Microsoft, is a control that consists of 2 or more controls. For instance, a composite control might contain a DropDownList and a RequiredFieldValidator. A custom control inherits from Control or WebControl and is uniquely defined by the developer. HTH, -BC
-
Creating Custom DataGrid ColumnDo you have any content in the footer of your DataGrid? If not, set the ShowFooter property to false. -BC
-
web forms inheritanceYou can set up a base class hierarchy for the code behinds, but not for the HTML pages. Your .aspx pages will need to be copied from a template page or use #includes (from Classic ASP) to include the common elements. Creating the inheritance hierarchy doing this sometimes creates issues for the design view in Visual Studio. The end result forces you to modify the pages in code view instead of design view. -BC
-
2 web.config files in a projectIt's definitely okay to have web.config files in sub folders. You have to be careful in the sub folders however. You can't change global application settings such as the session processing preferences or change the type of authentication for the website. You can add/override appSettings in the sub folder because they override the parent web.config. -BC
-
How can I do this(Entire mailing system)I wouldn't re-invent the wheel on this one. It's much easier to use a tool that someone else has constructed than to build one on your own. A good forum product out there is DotNetBB. HTH, -BC
-
Format the string inside a ListItemRickard, When you apply the PadLeft command to the string are you reassigning the newly created string to the old. For example: String string1 = "Some Text"; string1 = string1.PadLeft( 5, " " ); HTH, -Brian C.
-
ListView in ASP.NETThe DataGrid control is an excellent tool that is sometimes challenging. When I was first getting into ASP.NET I found this article to be of great help with regards to this server control. The website is aspnet.4guysfromrolla.com if this link does not work. Link: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx HTH, -Brian C.
-
Server Resources for Creating/Modifying XML FilesA friend has recently consulted me regarding server resource concerns for an idea that he has come up with. Unfortunately I was not able to answer his question directly and so I decided to see what others in the community have to say. The Question:
"If we were to create a script that builds/modifies XML files on the server for every active user in our database; how much of a strain on the server's resources would occur?"
My initial reaction was to ask some questions regarding number of users and how often these files would be created/modified. The Answers:
- 10,000+ (and growing)
- The files would be edited/created each time a user edits/creates his/her profile. So that the data in the XML file is always up to date.
The data for the users is currently being stored in a SQL Server 2000 database and the site is hosted on a shared Windows 2003 Server running ASP.NET v. 1.1. I am not actually sure why he wants to do this or the strain that it will cause on the server with files constantly being opened and closed for editing in conjunction with database queries. Any advice or knowledge on the subject is greatly appreciated. Thanks, -Brian C.