C#Asp.net [英] C# Asp.net

查看:87
本文介绍了C#Asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想动态创建一个Web表单 - 我的意思是不通过Add Item添加它,而是通过cs中的代码添加它,然后单独打开它就像一个新页面。 />
i试图像控件一样创建它 - form = new form()等......但它不起作用。


任何人都可以帮助我拜托?

谢谢

Hi, I want to create a web form, dynamically- I mean not to add it via "Add Item", but through the code behind in the cs, and then to open it seperately like a new page.
i have tried to create it like a control - form=new form() and etc... but it doesn''t work.

Can anyone help me please?
Thanks

推荐答案

你可以动态创建html并显示它,但我不相信你可以创建aspx飞行中的页面。

因为他们必须编译后端并且可以自行修改代码。

也许有办法,但看起来很糟糕练习这样做。
You could create html on the fly and show it, but I don''t believe you can create aspx pages on the fly.
Since they have to have their backend compiled and that would make for self modifying code.
Maybe there is a way, but it seems like a bad practice to do so.


谢谢你的回答。


对不起你,但我有另一个问题;

如果我创建一个htmlform的新对象,如:htmlform f = new htmlform;

我希望它在新页面打开我的意思是其他浏览器你在一个新窗口,怎么sh我能做到吗?我尝试了onclientClick =" open(''" + f +"'')" ;;但它在同一页面打开,而不是按照我的意愿单独打开,我也尝试了onclient click =" window.open(''" + f +"'')" ;;它告诉我页面无法找到 - 因为它不在解决方案资源管理器中...所以我怎样才能设置在单独的页面中打开它?

感谢帮助,我真的很感兴趣
Sorry to ditrub you but I have got another quetion;
if I create a new object of htmlform like : htmlform f=new htmlform;
and I want it to open in a new page I mean other browser you in a new window, how should I do it? I tried the onclientClick="open(''"+f+"'')"; but it opened in the same page, not in a seperate as i wished, and I have also tried the onclient click="window.open(''"+f+"'')"; and it told me that the page couldn''t be find - because it''s not in the solution explorer... so how can i manage to open it in a seperate page?
thanks for the help , i really apriciate it


这篇关于C#Asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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