在asp.net中创建动态.aspx和.cs文件时,IIS是否重新启动

问题描述:

当用户在我的应用程序中输入问题时,我需要动态创建.aspx和.aspx.cs页面,我们想要动态创建一个aspx页面以及页面名称与问题相同的一些内置功能。



例如:在ui用户输入的问题是我们中最大的状态,那么我想创建一个名为whichisbiggeststateinus.aspx的页面,我想要通过将一些内容加载到页面中来立即向用户显示该页面。



这里我的问题是网络服务器将重新编译整个应用程序或者它将编译和只加载新创建的.aspx和.aspx.cs页面?





任何帮助都非常感激,

i have a requirement of creating .aspx and .aspx.cs pages dynamically when the user enters a question into my applications ui , we want to create an aspx page dynamically along with some inbuilt functionality with the page name same as question.

Ex: in the ui user enters a question as which is the biggest state in us , then i want to create a page with the name whichisbiggeststateinus.aspx and i want to display that page immediately to the user by loading some content in to the page.

here my question is wether the webserver will recompile the whole application or it will compile and load only the newly created .aspx and .aspx.cs page ?


any help is greately appreciated,

这里重要的是内容而不是页面。你的设计很糟糕。您正在考虑在运行时创建asp.net页面?我认为甚至不可能。

将所有请求发送到一个页面。对它进行占位符控制。根据问题,创建页面内容并根据需要重写URL。
What's important here is the content and not the page. Your design is BAD. You are thinking of creating asp.net pages on runtime? I don't think that is even possible.
Send all requests to one page. Have a placeholder control on it. Based on the question, create the content of the page and rewrite the URL as required.