如何在页面后面创建和构建新的aspx及其代码? [英] how to create and Build a new aspx and its code behind page?

查看:136
本文介绍了如何在页面后面创建和构建新的aspx及其代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建,构建n发布新的aspx及其后面的代码?



我想要的是

例如:

i的项目名称为mydemoproject.csproj。

在这个项目中我有一个页面(creativepage.aspx及其代码隐藏)

the creativepage像这样的.aspx设计,



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"  />





当输入textbox1,textbox2值并单击 CreatePage bu时tton,

a新的Aspx及其代码隐藏页面(来自textbox1的新页面名称)必须在上述位置创建名称(不添加此项目 (mydemoproject.csproj) )



在我点击Build按钮之后,从提到的位置命名它构建newpage.aspx.cs(创建dll)



如何实现这个目标?请指明一种方法来达到此目的



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

推荐答案

您可以执行以下操作

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" />





在creativepage.aspx中。 cs

添加以下代码:



In creativepage.aspx.cs
add the following code:

        protected void Createpage_Click(object sender, EventArgs e)
Response.Redirect("~/Createpage.aspx")





和在solutionExplorer中右键单击项目mydemoproject - > addnew item - > webForm - >将webform命名为Createpage



你可以为其他人做也是以同样的方式



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


这篇关于如何在页面后面创建和构建新的aspx及其代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆