Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2004, 11:34 AM
Authorized User
 
Join Date: Apr 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default loading websites from a template

if you look at the websites that at http://www.4anyorder.com/restaurant.asp you start to see a pattern. It is obvious that they are loading all the restaurant websites from one template. you also notice that they are using the session object "restid" to load settings for that website.
http://www.4anyorder.com/webrestaura....asp?restid=85
http://www.4anyorder.com/webrestaura...asp?restid=101
http://www.4anyorder.com/webrestaura...asp?restid=103

this is very effecient and i wanted to know how you can implement something like this. what is the value of restid loading??

any thoughts??


rrr
__________________
rrr
 
Old September 5th, 2004, 12:08 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

AFAICS they are using a single ASP file that uses the QueryString variable (not a Session variable) called restid to retrieve the required information.

This information can come from multiple sources: most likely a database, but other sources like XML files, text files, Excel spreadsheets or Web services are quite possible as well.

How you can implement this depends on where your data is stored, and the server side techniques you want to / know how to use.

What server side technique do you want to use? You have posted in an ASP.NET forum, but the example you linked to used "classic" asp....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old September 5th, 2004, 12:28 PM
Authorized User
 
Join Date: Apr 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

didnt notice the classic asp. i intend to implement in asp.net

i am thinking of loading from a table using a stored procedure with restid.

the drop down menu is loaded from the information from the returned dataset which probably inturn loads the datalist

i would assume the returned dataset will have a columnn for color e.t.c.
But the part i cant figure out is how you load this information.

how would you dynamically choose the colors. is this done client side or server side?

how would you populate the drop down dynamically

I also noticed that the controls in the datalist also changes(some have soup and some dont). I guess the controls are enabled or disabled dynamically. are all this options stored in the returned datalist??

Am i even on the right track at all?? am officially confused

rrr
 
Old September 6th, 2004, 02:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It all depends on the time and complexity you're willing to spend / add to this project.

Personally, I wouldn't add all information to one dataset. I would separate the content from the layout, so I would retrieve style info, like font / color / images and other layout stuff separately from the dinner menu content (or whatever you're retrieving from the database).

I think I would create a class called Theme, for example, that exposes properties like BackColor, ForeColor, Font, RTL etc that would be filled with information from a database.

Then you can do something like this:

MyTextBox.BackColor = MyTheme.BackColor

to change the background color of a text box.

I think skinning / theming is a subject on its own. Search Google for skin theme asp.net and you'll find plenty of hits.
You can also take a look at the forum code of www.asp.net. It's customizable / skinnable, although I am not sure if the skins are saved in a database.

Do you have any experience with .NET? If not, I think it's better to focus on getting the content from the database first. That way, you'll understand how to connect to and use databases, and display the info on your site. Once you get the hang of it, you can expand your site with the theme thingy. Just my 2 cents though.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML in Websites salhabb Ajax 3 March 22nd, 2006 01:10 PM
Asp 2.0 websites jeffryokusa ASP.NET 2.0 Basics 2 November 14th, 2005 01:20 PM
JSP Tutorial websites?? cyrusds_asp JSP Basics 2 September 2nd, 2005 02:08 AM
Flash Websites Ben Horne Flash (all versions) 2 March 24th, 2004 05:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.