Re: .ASPX -> .CS generation
From: Lenard Gunda (frenzy_at_fbi.hu)
Date: 06/02/04
- Next message: Patrice: "Re: Intermittent error with assemblies....Parser Error Message: Access is denied:"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: stop databind for invisible controls?"
- In reply to: ranganh: "RE: .ASPX -> .CS generation"
- Next in thread: Cowboy: "Re: .ASPX -> .CS generation"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 2 Jun 2004 15:54:45 +0300
It does create a C# source file!
I added:
<% if true then .. %>
to the middle of an ASPX file. It reported a CSC compile time error, and I
was able to view the file being compiled, which was auto generated, and was
a C# class derived from my code behind class of the page, that outputted
through HtmlTextWriter the page content, created and initialized the
controls based on specified attributes, and called the controls to render
themselves. It even showed me the command line that was used to compile it.
The command line contained the temporal filesnames as well.
No doubt, it does many things when requesting an ASPX file, but this step is
one of it, and I am wondering if there is a program that can be used (or
command line arguments to something) to generate this .CS file?
-Lenard
"ranganh" <anonymous@discussions.microsoft.com> wrote in message
news:67A23672-B775-43B7-BBE4-3AD174E54731@microsoft.com...
> Dear Lenard,
>
> When you make a request to an ASPX file, it is not converted into C# file.
>
> It performs object initialization
> then it loads the viewstate data
> then it performs the LoadPostData Processes Postback Data
> it then loads the objects
> then it raises postback change events
> it processes client side postback event
> then prerendering of objects take place
> viewstate is saved then
> then the HTML is rendered.
>
> when you request a page, only the HTML is rendered and the scripts are
executed only at the server side.
>
> there are hell a lot of things that happen when you request an aspx page
:) thats why when the page first loads, it
> takes sometime, the aspx page is compiled at runtime and hence takes
sometime to get loaded the first time.
>
> hope it helps.
>
>
>
>
>
>
>
>
> ----- Lenard Gunda wrote: -----
>
> Hi!
>
> When I make a request to an ASPX file, it is converted into a C#
source file
> (given, the language is C#). This source can be seen, if I
intentionally put
> in something bad between <% ... %>, because it is treated as source
code,
> and if it is wrong, the C# compiler issues an error, when compiling
this
> generated .CS file.
>
> I would like to know, what program/utility is used by IIS/ASP.NET to
> generate .CS from .ASPX? Theoretically, if I would generate the .CS
by hand,
> and compile it, it would be possible to create websites that are
fully
> compiled in a DLL, right? Is there such a utility that permits me to
do it?
> I found no information, whatsoever, about how this part of ASP.NET
works.
>
> Thanks
>
> Lenard
>
>
>
- Next message: Patrice: "Re: Intermittent error with assemblies....Parser Error Message: Access is denied:"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: stop databind for invisible controls?"
- In reply to: ranganh: "RE: .ASPX -> .CS generation"
- Next in thread: Cowboy: "Re: .ASPX -> .CS generation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|