Question

I am converting an old html based website to ASP.NET, so that we can include more features like AJAX, Databases later on to the site. Currently my task is to create a new .aspx page for each older html page. To keep the layout persistent i have made a master page.

So currently i am building a content page from the master page, then renaming the content page and adding the text from the html page to the content placeholder area. However i was wondering if can cannot write a system, which can act as a Page Thrower.

Each hyperlink when clicked goes to a serverside code, where it requests the page it wants to load. Typically a webserver expects that the pagelink specified in the hyperlink does exist physically, but here what i am trying to do is that. Say the link is for the page "TravelDetails", the page need not exist physically, but the content of it is present in a file in (html format). so the Page Thrower gathers the data to display for that page, it has a master page already, it adds the html of it there and then throws the custom page. This way i don't have to keep 100+ aspx pages, i can do with a single page and maintain another data structure to store the content (static data) for each page. any guidance if my approach is right, and how to go about it?

Thanks

Was it helpful?

Solution

I think you should try some cms avaialable in market like dotnetnuke. Because every time you need to have to create a web page for a html page. In future if there will be any changes then it will take time. While in cms like dotnetnuke you just need to paste your html in existing system. You don't need to do coding again.

DotNetNuke is a free one. There are other Content Management System also available as well. Another advantage is that dotnetnuke is having skin features. So if you change skin at one place. You need not to do it for all the places.

OTHER TIPS

Take a look at ASP.NET MVC. It uses ASP.NET Routing, which may help you.

Alternatively you can use ASP.NET Routing without MVC, too.

Matthias

Just a thought. Create a page linked to the Master Page. In the content place holder add a Panel. Let your Page thrower decide which page to display, retrieve the html data & add it to the panel at runtime.

Why don't you create the pages dynamically and then use asp.net caching in order to increase throughput.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top