Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a forum - "Best way" - (no code)

Status
Not open for further replies.

TipGiver

Programmer
Sep 1, 2005
1,863
Hello to all.

This is not a request for help (code, etc) but rather a "what is the best way". So, getting started, i would like to read your opinions for some questions. I'll number the questions and also write my opinion too. So:


#1. Activity since last visit
I would go with cookies. Is there any better than this?

#2. Showing the posts
I would use a datagrid with what i can easily add paging and also modify (easy again) the templates. So i can have in a datarow's cell a label for the post, a hyperlink for email for example and so on. I am not sure if a data repeater control is better.

________________
If anyone else has any issues or other questions, you may add them here.
 
#1

Cookies seem a fairly sensible option to me although just to play devils advocate...Are you bothered if the user doesn't accept cookies? What happens if they delete the cookie? Shouldn't a more persistant state be used?

#2

I wouldn't use a datagrid as this will by default produce semantically invalid HTML (i.e. tables for non tabular data). I'd go with a repeater as you can control the output easier.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
>>#1. Activity since last visit


what kind of activity are you trying to track???

Known is handfull, Unknown is worldfull
 
1. if they use multiple computers the Last Active Date cannot be tracked using cookies.

2. I assume the Posts are read only in the view you describe above. If so then use a repeater. GridViews are very large objects used to modify tabular data. The repeater gives you full design control for read only data.

You could also opt for the FormView (not DataList) as well. the FormView is still "heavy" like the GridView, but gives you full design control and automated paging.

If you using asp.net 2.0 check out they hook into specific asp.net controls to emit valid HTML which is very easy to style with CSS (not server control display values).

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
vbkris
The same behaviour as this forum's "Activity since last visit". If there is a new post, then show a "new" icon or an asterisk (see tek-tips).

ca8msm
-If they do not accept cookies, then this is a problem.
-If they delete it (is nothing) then i take for granted that there is a new post.
-"more persistant state" ? Like database? What do you have in mind?

jmeckley
By mistake i assumed that there is one pc per user. Because cookies are stored in the user's pc, multiple computer is a problem. You are right.
 
-"more persistant state" ? Like database? What do you have in mind?
Yes, that was what I had in mind and would alleviate the cookie problems that have been identified.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
>>The same behaviour as this forum's "Activity since last visit". If there is a new post, then show a "new" icon or an asterisk (see tek-tips).

you want to show a special ikon to the user to track forums where activity has taken place since the user's logout?

have i got it right???

Known is handfull, Unknown is worldfull
 
you want to show a special ikon to the user to track forums where activity has taken place since the user's logout?

> Exactly that. Since the user's logout or Since the user's last log in.
 
i dont think cookies will help you here as cookies can track ONLY user activity and NOT your server activity (which is where your forums are).

the best way would be to use database. you could have a flag column for every user in your system which can be updated whenever there is a change in a forum. the idea i have given is just indicative, might not be the most optimised way (updating for every post in a forum is not good)...

Known is handfull, Unknown is worldfull
 
I use a field in the DB that tells me when then last logged in and when they last posted something. This way all I have to do is query the DB and the information is there.

Cookies is an OK idea, but as other users have pointed out, it won't solve the multiple computer problem or if the user's PC doesn't accept cookies.

Just my 2 cents.
 
>>Cookies is an OK idea

how exaclty can this be done using cookies???

Known is handfull, Unknown is worldfull
 
how exaclty can this be done using cookies???

> If cookie exists (store date) then read the date. Compare this value with the forums max date. Each forum area should have a unique id. If it doesnt exist, then say that there is a new post and show the icon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top