Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am trying to develop a news website that have several categories like Politics, Technology, Announcement, Obituary, etc(Each category is a table in the sql server express database)... All these Categories are shown in a menu tab.When each tab clicked it will navigate to corresponding pages. Most of the pages have same structure (Skin or theme) . that is the working of the site. i am using visual studio 2010 and ms sql server 2008.

I don't want create pages for each categories. Is there is any possible way to create pages dynamically to call each tables in the sql server when clicking the menu.

By the way, have another need is there any way to create new category after hosting the site by just giving the name of the category, like category name == facebook, and the press create.

thanks in advance... :)

(One of my friend told me to use query string. something like ~/catagory/category?page=urpage)
Posted
Updated 4-Sep-13 23:54pm
v3

1 solution

There are several ways in which you can achieve what you want:

# Have your page made up of different parts which will update asynchronously according to the selected choice of the users. You will need to implement a decent amount of javascript for this so use jQuery for cross browser reliability. Also your website is data driven so using a good javascript mvc framework would be a big win.
If you have time you can view one of these:
AngularJS
Knockout

# Use master and content pages, have a common content page and update its data based on the category selected.
See this to create content pages if you don't know already.
Link

# You can even create a separate aspx page to show the category data and use an iframe to display that page, but this is my least favourite because I have seen iframes causing many problems on mobile devices and you wouldn't like that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900