Solved

aspx webpage on the fly

Posted on 2016-09-06
3
39 Views
Last Modified: 2016-10-25
Can you show me how to write aspx webpage on the fly?
My website already has its own master page.

Assume I will select a product like abc then I can click a button
and it will create me xxx.com/pages/abc.aspx. Inside of the webpage, I want to add master page and the content will have like a text call

abc is great product to buy.

Of course, I will grant write / iuser permission to the file system in the web server.

Thanks,
0
Comment
Question by:ITsolutionWizard
3 Comments
 
LVL 30

Assisted Solution

by:Alexandre Simões
Alexandre Simões earned 250 total points
ID: 41786967
It's not possible to generate ASP.net pages at runtime.
ASP.net is a server-side language that needs to be compiled, so you can't do that (at least not without some trickery involved).

The proper way to achieve something similar is to create a generic item page and then populate it with the item based on the URL.
Something like: xxx.com/product.aspx?id=abc
The code behind will be responsible for fetching the data from the DB and presenting it on the page.
1
 
LVL 1

Accepted Solution

by:
Stefan Hoffmann earned 250 total points
ID: 41787218
The trickery involved is called Rewrite. It's the same technology e.g. php applications like wordpress use to simulate that a blog entry is at an url containing its title instead of ?post=5.

You can find a comprehensive article here:
http://weblogs.asp.net/scottgu/tip-trick-url-rewriting-with-asp-net

It may be not the newest article, but it describes all techniques and gives you the right google words. As far as I see it the most techniques will still apply.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question