954,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to make the aspx page at runtime


This is my first pageThis is my first page

Hemant-kumar
Newbie Poster
3 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Are you wanting to actually output an .aspx page and write it to a file?
Or just output the code to html to be copied then pasted?

Are you asking how to write to a file?

Or how you would format the output?

jerMAn
Light Poster
28 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

I too am a bit confused by the question. If you want your page to be DYNAMIC, you can add WebServer controls, and set their properties, at runtime. Doing so can be very problematic. This article details some of the issues and workarounds:

ASP.NET Page Life Cycle and Dynamic Controls

The page in your example certainly wouldn't require any ASP.NET, why not just create a simple HTML page?

Also, do you need a server round-trip for this? JavaScript can write into an open window.

I think we need more details about what it is you're attempting before we can give meaningful answers. Please post a more specific follow-up question.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

Actually i am making a wiki
In that user can update its page dynamically (i.e. at runtime)
i.e user can change the contant of the page at runtime
what i want is that when ever user click on the new page a new page is created dynamically at the runtime with the header and description blank by default. There would be a edit button on the page. As soon as he hit the edit button he will be redirected to a edit page where he enter the desired title, description of the page and name of the page. As soon as he presses the save button all the desired field like title and description should be save in the newly made web page. we can make it html page also but we need to put a Edit button each page. Please suggest me how to do that

Hemant-kumar
Newbie Poster
3 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

I would suggest using a database to store the dynamic content, and then use standard web development techniques for querying a database for content.

Or, use a tool like SnippetEdit http://www.SnippetEdit.com , which allows users to directly edit their content.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

Hemant,
I can understand what you are thinking.What you are trying to do is way too difficult.You'll have to create files and save files for the Response.redirect to work.You'll need an FTP to store files in the server and I think VS.NET does not offer that facility of FTP...

Check out this forum...
http://p2p.wrox.com/topic.asp?TOPIC_ID=4672
you'll understand...

I can tell you a WORK AROUND...

Things you'll have to include...
1.As Thomas said YOU'LL HAVE TO USE A DATABASE(I prefer using SQL server 2000)...
2.You'll have to provide some mode of recognizing each user(A primary key)..
3.Try keeping email address as a mode of recognition of each user..

THINGS TO DO
STEP 1:Create the database ..Keep a primary key...
My suggestion is to keep a login screen and authenticate each user..By this way you can control the properties of each user..
Check out this URL on how to provide authentication...

http://www.daniweb.com/tutorials/tutorial23605.html

STEP 2: CREATE EDIT.ASPX
Create a webform for getting values from the user for building the webpage. First time in..Show the user the building page..Keep some text boxes and mark the page Edit.aspx..Keep two buttons below the page and mark them Submit and Clear all values..

STEP 3:
When the user clicks submit button ..use Basic SQL insert statements to store the values to the database..

STEP 4:Create another page ..FINALPAGE.aspx
This page is more like a template...If you want to get the TITLE..use a Simple SQL statement and get the value from the database WHICH THE USER HAS ENTERED and assign that value to the Template..

Complete one step at a time...You should be good..

Hope it helps

Letscode
Junior Poster
175 posts since Feb 2005
Reputation Points: 11
Solved Threads: 6
 

Thanks for the suggestion i will try that and let you know if there is any problem

Hemant-kumar
Newbie Poster
3 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Hi!

If you need this functionalities, aka programmatically insert everything in runtime instead of using strange triks you can use this library: CEFramework . It builds all the controls in a completely dynamic fashion with use of Ajax and ATLAS

Zak

zarros
Newbie Poster
1 post since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You