Solved

aspx webpage on the fly

Posted on 2016-09-06
3
51 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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, …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 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