سؤال

I was thinking of creating a button for a site, which dynamically creates support pages with the CMS control...blank ones so the don't need to have us create like 12 or more and then deploy and such i had a solution where i would basically copy one of the support pages and rename it and place it in the SitePages folder...so the end result will be that subsequent pages created this way will share the same codebehind file...which eleminates the requirement for a build and compile on each page creation. this works on my local box and on staging...because the codebase there isn't precompiled...on production however, the code is precompiled and thus this solution basically doesn't work...

Does any1 has any idea on how to proceed?

Regards, Gautam

هل كانت مفيدة؟

نصائح أخرى

when you precompile your page will refer a dll instead of cs.

<%@ page title="About Us" language="C#" masterpagefile="~/Site.master" autoeventwireup="true" inherits="About, App_Web_ad0b3bhg" %>

In the above example App_Web_ad0b3bhg is dll. when you create new file you need to take care of it. Provide your code snippet that will help us to correct it in order to accomodate this.

One way to acheive this is , that your aspx pages does not specify Inherits attribute.For the support aspx only pages you can define a base Page type in the config file like following

<pages  pageBaseType="typename, assembly">
</pages>

Where type name is your code behing type/class and assembly is the compiled assembly that contains the type. So all your pages where Inherits element is missing, it shall inherit from the config class.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top