Re: Running code when viewing aspx code

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Vadivel Kumar (donotreply_at_spam-i-love-u.com)
Date: 02/11/05


Date: Fri, 11 Feb 2005 19:24:39 +0530

Assuming that you are working with VS.NET

If you open any aspx file in VS.NET by double clicking in Solution Explorer,
VS will open
that page in design mode, As per my understanding the design view is nothing
but
like a web browser, so it executes the code there and shows the error.

I too have faced some strange errors when opening a aspx page in design view
you can change this options in tools>options window to open any aspx page
in html view.

Have a try, as i'm not sure about this answer.
Atleast it will help you in going closer towards the problem.

-- 
Vadivel Kumar
http:\\charpblogs.blogspot.com
"Matthias H." <MatthiasH@discussions.microsoft.com> wrote in message 
news:25ABFA15-201C-44B5-B200-38842053BEAB@microsoft.com...
> Hi guys,
>
> Our team has a very strange problem. I hope anybody can help.
>
> We have a class called webpage and all our aspx-pages bases on it. Then we
> have a SYS.IO.File Class which have a function. This function checks the 
> hash
> value of some ini-files. If the hash value is not valid then the function
> throws an error.
> Imagine we are editing the code behind file of an aspx-page. If we now 
> want
> to view the aspx-code we double click the aspx-file in the project 
> explorer
> and then there occurs the exception of the function in the class 
> SYS.IO.File.
> The application is not running.
> We don't have any idea why the webpage is calling the function in this 
> moment.
> Is there any possible reason why code is running when viewing the 
> aspx-code
> while the web-application is not running? 


Relevant Pages

  • Re: How do I tell VS2005 about a code-behind file?
    ... They were still shown as separate items. ... they just show as two separate top-level nodes in the solution explorer. ... I'm trying to find a way of persuading VWD to put the .cs file as a node below the .aspx file, so the top-level nodes are.aspx files. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cant swith to Design view in ASPX file. Is this a bug?
    ... only .ASPX is needed for IIS to run it. ... open a .ASPX in "design" mode, not html mode, it requires code behind and ... resource files of the .ASPX file. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: using user control in form & using design time question
    ... webform, the .aspx file will be complied at run-time, and when compiling ... if the used properties/methods in the .aspx exists in UserControl class. ... For winform application, the entire project will compile at once, without 2 ...
    (microsoft.public.dotnet.framework.windowsforms)
  • VS 2005-Missing scroll bars?
    ... While working on an .aspx in the interface, looking at the design ... there are suddenly no scroll bars and I cannot see the rest of ...
    (microsoft.public.vstudio.development)
  • Re: Change the document library displayed based on a click in a list
    ... Thank you for introducing more information regarding your scenario! ... I'd suggest you will need to re-create one aspx page for this design. ... You can read all the available doclib GUID through object ...
    (microsoft.public.sharepoint.portalserver.development)