473,396 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1831
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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...
4
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...
9
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
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...
8
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
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...
4
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
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...
24
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I see in javascript if a web browser accepts cookies?...
0
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"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.