Click to See Complete Forum and Search --> : IE prompts to download or open file when .aspx with web user control is launced


sukye
March 12th, 2003, 12:18 AM
I have a control.ascx file which contains a very simple web user control with just a line of static text. And I have put this control into a web form, called webform.aspx.

The problem is when I try to view the aspx file in IE, I get a prompt saying "... downloading webform.aspx from localhost. Do you want to save or open the file?". If I click "open", then the source code is opened in visual studio .net.

If I remove the line "<% @Register .... %>", then the page displays in IE ... but of course I won't be able to see the web user control.

Has anyone of you encountered this before? Please help.

sukye
March 12th, 2003, 06:31 PM
Hi guys, I have solved the problem. It happened because the asp.net file extensions such as aspx, ascx, etc were not registered in IIS. In order to fix that, just run aspnet_regiis in command prompt.