i am working on an project where i will need to create pages dynamically..

Can anyone please guide me??

mani-hellboy commented: are you playing what you need .... get lost +0

Recommended Answers

All 8 Replies

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

thanks for ur reply..

i need aspx pages..

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

Change the extension of file.

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

Thank u..

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


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

Please guide me..

YOu still haven't explained what you are trying to achieve. I suspect you are overengineering this.

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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.