Solved

aspx webpage on the fly

Posted on 2016-09-06
3
45 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

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

Suggested Solutions

Title # Comments Views Activity
reading excel file in .net 2 30
JQuery Detecting page post back 6 19
VB.NET - Refactor Class per SOLID principles 2 33
Please Explain What Reading a Zip file Back In Means 11 59
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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, …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 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