Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 at 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
0 OriginalGriff 324
1 Maciej Los 224
2 Sergey Alexandrovich Kryukov 182
3 Richard MacCutchan 120
4 CPallini 120
0 OriginalGriff 5,474
1 Sergey Alexandrovich Kryukov 4,713
2 Peter Leow 2,944
3 DamithSL 2,465
4 Maciej Los 2,434


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