如何创建在asp.net(C#)动态页面? [英] how can i create a dynamic page in asp.net (C#)?

查看:217
本文介绍了如何创建在asp.net(C#)动态页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站的应用程序增加了一个页面First.aspx。内部First.aspx页,我有一个按钮和一个名为btnbutton。
    onclick事件的btnbutton事件新动态页面应该打开。
    我怎样才能做到这一点?
    请记住创建了新的动态页面,是不是在现有的应用程序。此页面将会在运行时动态也被创建。
    请帮我!

I added a page "First.aspx" in my website application. Inside First.aspx page i have a button named btnbutton. "onclick" Event of "btnbutton" a new dynamic page should open. how can i do this.? Please Remember the new dynamic page created, is not in existing in the application. This page should be created at runtime and dynamic also. please help me out!

推荐答案

如果你问有关生成的 ASP.NET 的在运行的,那是不可能的页面。其原因如下:

If you are asking about generating ASP.NET pages at runtime, that is impossible. The reason is the following:

您需要编译的的code
   ASP.NET 页面之前运行它。然后
  你的网页后是不可能的
  应用程序已启动。

You need to compile the code of the ASP.NET page before run it. And that is impossible after your web application has started.

不过,如果你是问关于页面之间的导航,那么,你可以使用的Response.Redirect

However, if you are asking about navigation between pages, then, you could use Response.Redirect:

Response.Redirect("http://www.stackoverflow.com/");

这篇关于如何创建在asp.net(C#)动态页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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