473,834 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cookies -vs- DB Table

On an Intranet Web application I'm working on, I need to
display a Pop-up that shows the users what report changes
have occurred. This may happen once a week or more and I
need a way for the users to turn-off this Pop-up after
they've reviewed the changes.

Currently, I'm debating whether to use cookies or build a
table that will set flags. I'm not sure what the best
solution to take would be. Does anyone know what would be
the best solution? I don't like the idea of using Pop-
ups. I'd rather have a link for the user to click that
shows the report changes, but my client wants to use pop-
ups.

If I use cookies, how do I create one, and how do I update
it so it knows when to and when not to display a pop-up?
I've never created a cookie before, so if someone has some
sample code that would helpful.

As for the Pop-up, I've seen pop-ups that loads a new
instance of IE, and I've seen pop-ups that look embedded
in the current instance of IE with a close option. I
would like to create the latter pop-up? Has anyone done a
pop-up like the embedded one before? If so, where can I
find some sample code on how to create one?

Thanks,

Scott

Jul 19 '05 #1
5 1849
Scott wrote:
On an Intranet Web application I'm working on, I need to
display a Pop-up that shows the users what report changes
have occurred. This may happen once a week or more and I
need a way for the users to turn-off this Pop-up after
they've reviewed the changes.

Currently, I'm debating whether to use cookies or build a
table that will set flags. I'm not sure what the best
solution to take would be.
It doesn't much matter. The database solution would be better if there was a
chance that users might shut off cookies on their machines.
Does anyone know what would be
the best solution? I don't like the idea of using Pop-
ups. I'd rather have a link for the user to click that
shows the report changes, but my client wants to use pop-
ups.

If I use cookies, how do I create one, and how do I update
it so it knows when to and when not to display a pop-up?
A Google search would turn up tons of examples. Try these keywords: asp
cookies example
See here for the documentation:
http://msdn.microsoft.com/library/en..._vbom_reqo.asp
I've never created a cookie before, so if someone has some
sample code that would helpful.

As for the Pop-up, I've seen pop-ups that loads a new
instance of IE,
client-side code:
window.open
window.showmoda ldialog
window.showmode lessdialog
and I've seen pop-ups that look embedded
in the current instance of IE with a close option.
more client-side code:
use a div which can be positioned absolutely and dynamically hidden and
displayed

See here for dhtml documentation:
http://msdn.microsoft.com/workshop/a...node_entry.asp

With either method, you will probably need to use an XMLHTTP object to
periodically open a page on the server which will return the information
contained in the cookie or database. A Google search should find you some
examples of doing this.

I
would like to create the latter pop-up? Has anyone done a
pop-up like the embedded one before? If so, where can I
find some sample code on how to create one?

Client-side coding questions are off-topic on this newsgroup. ASP is
server-side technology, so if you have any more questions about creating
cookies or querying your database, follow-up with us.

For the pop-up questions, follow-up in a client-side newsgroup: look for one
with "dhtml" in its name, or try one of the scripting newsgroups, depending
on whether you wish to use vbscript or jscript (recommended) in the
client-side code.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
> It doesn't much matter. The database solution would be better if there was
a
chance that users might shut off cookies on their machines.


Well, unless the OP was planning to use a cookie to identify the data in the
database as belonging to that user. :-)

In an intranet, of course, there are other ways...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #3
Aaron Bertrand [MVP] wrote:
It doesn't much matter. The database solution would be better if
there was a chance that users might shut off cookies on their
machines.


Well, unless the OP was planning to use a cookie to identify the data
in the database as belonging to that user. :-)

In an intranet, of course, there are other ways...


Yes, in an intranet app, I take it for granted that Windows Authentication
is going to be used ...

Bob

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4
Hi,

I think you should use a database table instead of cookies. Its a better way.

Regards,
Bhaskardeep Khaund
"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message news:eh******** ******@TK2MSFTN GP12.phx.gbl...
Aaron Bertrand [MVP] wrote:
It doesn't much matter. The database solution would be better if
there was a chance that users might shut off cookies on their
machines.


Well, unless the OP was planning to use a cookie to identify the data
in the database as belonging to that user. :-)

In an intranet, of course, there are other ways...


Yes, in an intranet app, I take it for granted that Windows Authentication
is going to be used ...

Bob

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5

This is my thought as well. This client I work for
doesn't do analysis. They prefer to do adhoc with
multiple releases rather than perform analysis properly.
-----Original Message-----
Hi,

I think you should use a database table instead of cookies. Its a better way.
Regards,
Bhaskardeep Khaund
"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message news:eh******** ******@TK2MSFTN GP12.phx.gbl... Aaron Bertrand [MVP] wrote:
>> It doesn't much matter. The database solution would be better if >> there was a chance that users might shut off cookies on their >> machines. >
> Well, unless the OP was planning to use a cookie to identify the data > in the database as belonging to that user. :-)
>
> In an intranet, of course, there are other ways...


Yes, in an intranet app, I take it for granted that

Windows Authentication is going to be used ...

Bob

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
14723
by: Maverick | last post by:
Hello all, I read some good reviews about jakarta HTTPClient about its session and cookies management system and fancied giving it a try as a learning exercise but somehow I don't seem to be able to get it to work properly. I'm basically trying to connect to this site http://s1.starkingdoms.com/scripts/main.php I am able to get past the authentication login page onto the next screen but I then can't proceed any further because of...
4
3887
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any new site I goto seems to prompt me to store their cookie. The other is Pocket IE on Pocket PC 2002, with the cookies set to 'enabled'. My problem is that the cookies dont seem to be being written with my ASP. I dont get the prompt to store...
9
2541
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
6
3063
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a cookie (say Response.Cookies ("TEST")) and you have a query string variable &test=x or &Test=x and you get Request.QueryString to parse the query string, the cookie that gets dropped matches the case of the query string, not what your code says. ...
8
2346
by: CDARS | last post by:
Hi all, I have a confusing question on ASP.NET cookies usage: 1> Response.Cookies("test").value = Now 2> Response.Write(Request.Cookies("test").value) 3> 4> Response.write("<hr>") 5> 6> Response.Cookies("test").value = Now.AddDays(10)
6
8855
by: Stephane | last post by:
Hi, I have a login page where if the user wants his access codes to be saved are set into a cookie. In the logout page, I want to delete those cookies. I tried this and this is not working at all: if (Request.Cookies != null && Request.Cookies != null) { Response.Cookies.Value = null;
4
1863
by: Water Cooler v2 | last post by:
I am practicing Cookies in .NET. Its working fine but when I want to clear my cookies, the statement, Response.Cookies.Clear does not work. What gives? Here's what I do:
0
1713
by: Claudio | last post by:
I have a demo app where cookies does not work. The first page create a cookies. The second read the contet. If I browse the pages via IE6.0 the pages does not work. If I browse the pages via FireFox the pages work fine. ************ SetCookies.asp <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
24
2484
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I see in javascript if a web browser accepts cookies? ----------------------------------------------------------------------- Writing a cookie, reading it back and checking if it's the same. http://www.w3schools.com/js/js_cookies.asp Additional Notes:
0
1607
by: rn5a | last post by:
This is how I am creating & then reading cookies: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) 'create cookies Response.Cookies("UserName").Value = "Ron" Response.Cookies("UserName").Expires = "12/31/2008" Response.Cookies("UserDetails")("FirstName") = "Ronnie" Response.Cookies("UserDetails")("LastName") = "Nathan"
0
9646
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9332
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6957
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5627
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3981
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.