469,271 Members | 1,000 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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 1703
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.showmodaldialog
window.showmodelessdialog
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******@NOyahoo.SPAMcom> wrote in message news:eh**************@TK2MSFTNGP12.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******@NOyahoo.SPAMcom> wrote in message news:eh**************@TK2MSFTNGP12.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Brian Burgess | last post: by
6 posts views Thread by Mark | last post: by
6 posts views Thread by Stephane | last post: by
4 posts views Thread by Water Cooler v2 | last post: by
reply views Thread by rn5a | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.