3
Contributors
8
Replies
11
Views
5 Years
Discussion Span
Last Post by bhagyap
0

You haven't specified that what types of pages/files you want to add dynamically. However you may use System.IO classes to create a file/page.

For instance,

string filePath=MapPath("~/file.html");
string htmlText="<!DOCTYPE html> <h1>Hello World</h1>";
System.IO.File.WriteAllText(filePath,htmlText);
0

Can you explain more about your application and what you want to achieve (not how you want to do it) There may be another solution to your problem

0

Change the extension of file.

string filePath=MapPath("~/file.aspx");
string htmlText="<%@ Page Language=\"C#\" %>\n<!DOCTYPE html> <h1>Hello World</h1>";
System.IO.File.WriteAllText(filePath,htmlText);
0

Thank u..

But i want simultaneously an .cs file also.. Please guide me..

Edited by bhagyap: n/a

0

hi..

sorry,but i would like to know how to include an existing master page while adding an new aspx page..

Please guide me..

0

I am trying to create dynamic menus and adding it to an menucontrol and i want to simultaneously add its relevant page with its default master page selected..

Please guide me..

Edited by bhagyap: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.