Solved

aspx webpage on the fly

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 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