Tag Archive: html


The ParentError.aspx page described earlier tries to close the popup browser window after passing the error to the parent page. If the javascript just calls window.close(), Internet Explorer prompts the user if they want to allow the page to close. With the following code, the window will close without a prompt and it works in both IE and Firefox:

// close the window without a prompt in both IE and Firefox
window.open('', '_self');
window.close();

Visual Studio Tip: Auto-format ASPX/ASP/HTML markup pages

If you have a messy markup page (ASPX, ASP, HTML, XML, etc.) that’s hard to read, just hit Ctrl-K then Ctrl-D and Visual Studio will instantly format it with carriage returns, nested tabs, etc.

For example, this:

<?xml version="1.0" encoding="utf-8" ?><myclass><myfield1><myfield2></myField2></myField1></myClass>

Becomes this:

<?xml version="1.0" encoding="utf-8" ?>
<myclass>
  <myfield1>
    <myfield2></myField2>
  </myField1>
</myClass>
© 2017 Robert Corvus