R
Richard
In a forum I made in ASP Classic I had the following code.
-------------------------------
If Session("dtmLastVisit") = "" AND
Request.Cookies("DigiForum")("LastVisit") <> "" Then
Session("dtmLastVisit") = CDate(Request.Cookies("DigiForum")("LastVisit"))
Response.Cookies("DigiForum")("LastVisit") = CDbl(Now())
Response.Cookies("DigiForum").Expires = DateAdd("yyyy", 1, Now())
ElseIf Session("dtmLastVisit") = "" Then
Session("dtmLastVisit") = Now()
End If
If isNumeric(Request.Cookies("DigiForum")("LastVisit")) Then
If CDate(Request.Cookies("DigiForum")("LastVisit")) < DateAdd("n", -5,
Now()) Then
Response.Cookies("DigiForum")("LastVisit") = CDbl(Now())
Response.Cookies("DigiForum").Expires = DateAdd("yyyy", 1, Now())
End If
Else
Response.Cookies("DigiForum")("LastVisit") = CDbl(Now())
Response.Cookies("DigiForum").Expires = DateAdd("yyyy", 1, Now())
End If
-------------------------------
This code made sure each time when a user revisited a page and there had
been a new post, a "new" would show itself.
The problem I have is making this code work in ASP .NET. I was wondering if
someone could give me an url on where
this topic is discussed in ASP .NET or maybe can help me convert this code
into VB for .NET.
Thx in advance,
Richard
-------------------------------
If Session("dtmLastVisit") = "" AND
Request.Cookies("DigiForum")("LastVisit") <> "" Then
Session("dtmLastVisit") = CDate(Request.Cookies("DigiForum")("LastVisit"))
Response.Cookies("DigiForum")("LastVisit") = CDbl(Now())
Response.Cookies("DigiForum").Expires = DateAdd("yyyy", 1, Now())
ElseIf Session("dtmLastVisit") = "" Then
Session("dtmLastVisit") = Now()
End If
If isNumeric(Request.Cookies("DigiForum")("LastVisit")) Then
If CDate(Request.Cookies("DigiForum")("LastVisit")) < DateAdd("n", -5,
Now()) Then
Response.Cookies("DigiForum")("LastVisit") = CDbl(Now())
Response.Cookies("DigiForum").Expires = DateAdd("yyyy", 1, Now())
End If
Else
Response.Cookies("DigiForum")("LastVisit") = CDbl(Now())
Response.Cookies("DigiForum").Expires = DateAdd("yyyy", 1, Now())
End If
-------------------------------
This code made sure each time when a user revisited a page and there had
been a new post, a "new" would show itself.
The problem I have is making this code work in ASP .NET. I was wondering if
someone could give me an url on where
this topic is discussed in ASP .NET or maybe can help me convert this code
into VB for .NET.
Thx in advance,
Richard