[英]ASP.NET - How to get and set MasterPage attribute in page code behind?
[英]ASP.NET:Create dynamically Masterpage and aspx page in runtime in code behind?
我想在后面的代码中动态制作一个aspx页面和母版页,并保存在特定路径中。 我正在搜索此代码,但是我发现了一些这样的代码:
字符串filePath = MapPath(“〜/ file.aspx”);
字符串htmlText =“ <%@页面语言= \\” C#\\“%> \\ n <!DOCTYPE html> <h 1> Hello World </ h1>”;
//我放置了这些空间,因为不要更改输出语句;)System.IO.File.WriteAllText(filePath,htmlText);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.