Setting a WebForm (.aspx and source file) as an assembly Embedded Resource

  • Thread starter Thread starter LidorP
  • Start date Start date
L

LidorP

Hello All,

My problem is as follows:
I have an assembly which holds a number of WebForms.
In order to use these WebForms in my WebApplication i
have to extract them out of the assembly (using
Reflection) into a temporary virtual directory (at
runtime).
I was able to set the .aspx as an Embedded Resource but i
didn't find out how to set the code-behind source file
and the .resx file as so.

I know i can copy the WebForms manually to my WebApp but
i don't want to because it would cause cause
synchronization problems during development, and a
deployment overhead.
I also know that setting a code file as an Embbeded
Resource could cause it not to compile (??), so maybe
it's impossible...

I was wondering if there is a solution to my problem ?

Thanks.
 
How is your assembly containing the actual .aspx files? It doesn't. Your
assembly is comprised of all the compiled code you've written, not your
actual .aspx files.

You need to deploy not only the assembly to the production environment, but
also the actual .aspx pages since these are the pages that will be requested
by the client. If the pages aren't there, the client will receive a 404
Page Not Found error.

Essentially, your .aspx files ARE you web pages. Can't have a web site
without web pages.
 
Back
Top