Click here to Skip to main content
12,296,174 members (63,301 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# VB ASP.NET ADO.NET Ajax MVC , +
how to create ,Build n publish a new aspx and its code behind page?

Wat i want is
for example :
i have a project name as mydemoproject.csproj.
In this project i having a page(creativepage.aspx and its codebehind)
the creativepage.aspx design like this,

NewPageName:  <input type="text" id="textbox1"  value="" />
Location Name:<input type="text" id="textbox2"  value="" />
 
              <input type="Button" value="CreatePage"  />
              <input type="Button" value="Build"  />

When textbox1 ,textbox2 values entered and clicked the CreatePage button,
a new Aspx n its codebehind page(newpage name from textbox1) have to created in the mentioned location Name (Not add with this project(mydemoproject.csproj))

After tat when i click the Build Button ,from the mentioned location Name its Builds the newpage.aspx.cs (to create dll)

How to achieve this ?Please instruct a way to reach this
Posted 5-Dec-12 7:07am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You can do the following
NewPageName:  ;input type="text" id="textbox1"  value="" />
Location Name;input type="text" id="textbox2"  value="" />
 
              ;input type="Button" value="CreatePage" id="Createpage"  />
              ;input type="Button" value="Build" id="build" />

In creativepage.aspx.cs
add the following code:
        protected void Createpage_Click(object sender, EventArgs e)
Response.Redirect("~/Createpage.aspx")

and in the solutionExplorer rightclick on the project mydemoproject -->addnew item-->webForm-->name that webform as Createpage

You can do for the other also in the same fashion
  Permalink  
Comments
jawaharraj89 6-Dec-12 2:29am
   
i want to create a newpage programmcatically

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100