ASP CookieParameter

N

Nico VanHaaster

Hey Guys,

I have been looking through alot of documentation on the Microsoft
Website as well any other resource out there that i can think of and i
can't seem to get this to work.

On log in a cookie is created with some important user data that
carries out alot of filtering through the website. I have been able to
use the subkeys of the cookie in other pages however when using it in a
<selectparameter> nothing seems to happen. I know the cookie is being
read on this page as another filter happens on a dropdown box based on
the same subkey value.

Here's some code let me know if u see anything

(alot left out for space requirements)

<asp:AccessDataSource ID="AccessDataSource1" runat="server"
ConflictDetection="CompareAllValues"
DataFile="~/New.mdb"
DeleteCommand="DELETE FROM [NonLogTemp] WHERE [EntryID] =
@original_EntryID"
SelectCommand="SELECT [EntryID], [Date], [ID], [Dept],
[OfficeID], [Login], [Modified], [EnterDate], [TotHours], [Logout] FROM
[NonLogTemp] WHERE [OfficeID = ?] ORDER BY [ID]"
<SelectParameters>
<asp:CookieParameter CookieName="officeid"
Name="officeid" type="string" />
</SelectParameters>
</asp:AccessDataSource>
The cookie is generated through this code on the login page

Dim MyCookie As New HttpCookie("pservercookie")
MyCookie.Values.Add("UserName", username.Text)
MyCookie.Expires = DateTime.Now.AddHours(1)
MyCookie.Values.Add("fname", empInfo("FirstName"))
MyCookie.Values.Add("lname", empInfo("LastName"))
MyCookie.Values.Add("group", empInfo("MemberOf"))
MyCookie.Values.Add("llogin", empInfo("llogin"))
MyCookie.Values.Add("officeid", empInfo("officeID"))
myConnection.Close()
Response.Cookies.Add(MyCookie)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top