Solved

aspx webpage on the fly

Posted on 2016-09-06
3
27 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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now