Simple User Personalisation
page 4 of 5
by . .
Feedback
Average Rating: 
Views (Total / Last 10 Days): 25373/ 27

Back to InfoStuff

Back to InfoStuff

By now, the user would have created a string like 0001010001 and has been sent back to infostuff.asp. Now we need to sort out this string -

If Len(Session("pers")) Then
Dim pers
Dim ind
Dim sto
Dim tod
Dim tec
Dim sci
pers = Session("pers")
ind = Mid(pers, 1, 2)
sto = Mid(pers, 3, 2)
tod = Mid(pers, 5, 2)
tec = Mid(pers, 7, 2)
sci = Mid(pers, 9, 2)
'more to come

This checks to see if the personalization string is there and then chops it up into the individual parts that were assigned earlier.
Next we need to call the appropriate subs, depending on what the user chose to display -

Call page_top
If ind = "01" Then
Call page_in
End If
If sto = "01" Then
Call page_st
End If
Call page_inner
If tod = "01" Then
Call Page_to
End If
If tec = "01" Then
Call page_te
End If
If sci = "01" Then
Call page_sc
End If
Call page_end

So - If the user chose to view only Technology and Stocks, then the string would look like - 0001000100. Then when it is broken up, only stocks and technology are 01 (the rest are 00). Then these if statements would only call page_top (always there), page_st (stocks), page_inner (always there), page_te (technology) and page_end (always there).

Else
Call page_top
Call page_in
Call page_st
Call page_inner
Call Page_to
Call page_te
Call page_sc
Call page_end
End If

And if they haven't personalized, then the normal page is displayed.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-25 7:44:12 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search