How to create and add asp.net page programmatically to Asp.net project?
<p>I am working on a project CMS where i am creating pages dynamically using html editor .My achievement is that i have created html page successfully now problem is that i am stuck to the point how to create asp.net page using c# and assigning it to master page 2 major problems.</p>

<p>1-the page created in directory that is current and not open on local host or domain that shows that it is not a part of project.</p>

<p>2-How to create asp.net page using master page programaticaly so that in its body tag i  will add the created html page located in current directory.</p>

<p>so tell me how should i create asp.net page and make it the part of project too and assign it a master page here is a code how i am creating html page in current directory</p>

<pre><code>        string content = "&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;header&gt;&lt;title&gt;{MY_TITLE}&lt;/title&gt;&lt;/header&gt;&lt;body&gt;{body}&lt;/body&gt;&lt;/html&gt;";

        List&lt;string&gt; lines = new List&lt;string&gt;();

        content = content.Replace("{MY_TITLE}", titleTextBox.Text);
        string name = TextBox1.Text;
        content = content.Replace("{body}", Editor2.Content);
        lines.Add(content);
        string nameP = seelctName(Convert.ToInt32(name));
        nameP = nameP.Replace(" ", "");
        File.WriteAllLines(AppDomain.CurrentDomain.BaseDirectory + "\\" + nameP + ".htm", lines.ToArray());
</code></pre>

<p>But i am thinking to assign this inner content to newly created asp.net page using c# linked to master page and make it a part of project mean open in domain too</p>