473,396 Members | 1,767 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.

Can I use Data Caching without a Session?

Hi all,
I am trying to get an ASPX page written in VB and VS 2008 to open more
quickly inside of am Iframe in a standard HTML page.

One of the things the page does is to allow users to click a link that
generates an Excel file depending on the choices the suer has made on the
ASPX page. The Link doesn't actually Post the page, so I can't use the Form
fields to transmit data to the XLS creator.

So I was using Session variables. However, I think that creating a Session
causes too much overhead. Thus my question, can I use Data Caching without a
Session? When the XLS generator is called via Hyperlink, how will it know
which Cached variables it needs?

Thanks...

Aug 19 '08 #1
6 1249
John Kotuby pretended :
Hi all,
I am trying to get an ASPX page written in VB and VS 2008 to open more
quickly inside of am Iframe in a standard HTML page.

One of the things the page does is to allow users to click a link that
generates an Excel file depending on the choices the suer has made on the
ASPX page. The Link doesn't actually Post the page, so I can't use the Form
fields to transmit data to the XLS creator.

So I was using Session variables. However, I think that creating a Session
causes too much overhead. Thus my question, can I use Data Caching without a
Session? When the XLS generator is called via Hyperlink, how will it know
which Cached variables it needs?

Thanks...
Is that a single page where you can change some settings and click the
XLS-link?
If so, why not use a LinkButton? This looks just like a regular link to
the user but posts the page so you can read the settings.

If that settings-page is a different page, you could use cookies to
store the settings. When the user clicks that (regular) link, the
browser sends those cookies along with the request.
If the settings are too large to store in cookies, maybe you could
store them in the Cache on the server (or in a database) under some
unique identifier. Store that ID (Guid??) in a cookie.

Why do you think that creating a session is too much overhead?

Hans Kesting
Aug 19 '08 #2
I'm not sure how these caching issues are related to the problem you have
with displaying this page for the first time. Have you tried first to see
where your time budget is spent ? Keep in mind it could be also not a server
issue but rather the time needed to send back and render a huge html page to
the browser...

What is shown in this page ? Have you tried to time server side how long it
takes ? it would give you a first clue...

Each cache entry is stored under a name so you'll address the value by its
name... See System.Web.Cache doc for details but for now I'm not sure it
would solve your issue...

--
Patrice
"John Kotuby" <jo***@powerlist.coma écrit dans le message de groupe de
discussion : eb**************@TK2MSFTNGP03.phx.gbl...
Hi all,
I am trying to get an ASPX page written in VB and VS 2008 to open more
quickly inside of am Iframe in a standard HTML page.

One of the things the page does is to allow users to click a link that
generates an Excel file depending on the choices the suer has made on the
ASPX page. The Link doesn't actually Post the page, so I can't use the
Form fields to transmit data to the XLS creator.

So I was using Session variables. However, I think that creating a Session
causes too much overhead. Thus my question, can I use Data Caching without
a Session? When the XLS generator is called via Hyperlink, how will it
know which Cached variables it needs?

Thanks...

Aug 19 '08 #3
Thanks Hans...
It may be true that creating a session is not what is causing the overhead.
The ASPX page in the Iframe itself is rather large 67K to 150K depending on
the data and is multi-functioned. It contains a DataList control, a
3rd-party Grid Control that allows client-side sorting and grouping,
a Tabbed MultiView control that allows viewing of details of the Grid Item
selected and a ListBox that the user can add items to.

When the user clicks the XLS link, I want the page to remain in the
background and the Excel file to be downloaded (or opened in Excel itself)
rather than displayed in a new page. The idea is to keep the original page
in the background while the user can perform multiple tasks. I can only get
that to work properly (so far) using a standard hyperlink.

What is being sent is not just a few settings but also a comma delimited
list of IDs that are used to generate the details which occupy several
worksheets including the Summary worksheet. I have had users submitting up
to 500 IDs and creating HUGE spreadseets.

The idea of sending a unique indentifier via cookie sounds like a good one.

Thanks for responding...I will try to find other ways to accelerate the
delivery of the original ASPX that resides in the Iframe.

"Hans Kesting" <ne*********@spamgourmet.comwrote in message
news:uI**************@TK2MSFTNGP04.phx.gbl...
John Kotuby pretended :
>Hi all,
I am trying to get an ASPX page written in VB and VS 2008 to open more
quickly inside of am Iframe in a standard HTML page.

One of the things the page does is to allow users to click a link that
generates an Excel file depending on the choices the suer has made on the
ASPX page. The Link doesn't actually Post the page, so I can't use the
Form fields to transmit data to the XLS creator.

So I was using Session variables. However, I think that creating a
Session causes too much overhead. Thus my question, can I use Data
Caching without a Session? When the XLS generator is called via
Hyperlink, how will it know which Cached variables it needs?

Thanks...

Is that a single page where you can change some settings and click the
XLS-link?
If so, why not use a LinkButton? This looks just like a regular link to
the user but posts the page so you can read the settings.

If that settings-page is a different page, you could use cookies to store
the settings. When the user clicks that (regular) link, the browser sends
those cookies along with the request.
If the settings are too large to store in cookies, maybe you could store
them in the Cache on the server (or in a database) under some unique
identifier. Store that ID (Guid??) in a cookie.

Why do you think that creating a session is too much overhead?

Hans Kesting


Aug 19 '08 #4
Thanks Patrice,

I will try to see if I can cut the fat from the ASPX page if possible. Maybe
the delay has nothing to do with creating a session. That is a very good
point.

I gave a more extensive answer about what is on the page to Hans who also
responded.

Thanks again.

"Patrice" <http://www.chez.com/scribe/wrote in message
news:88**********************************@microsof t.com...
I'm not sure how these caching issues are related to the problem you have
with displaying this page for the first time. Have you tried first to see
where your time budget is spent ? Keep in mind it could be also not a
server issue but rather the time needed to send back and render a huge
html page to the browser...

What is shown in this page ? Have you tried to time server side how long
it takes ? it would give you a first clue...

Each cache entry is stored under a name so you'll address the value by its
name... See System.Web.Cache doc for details but for now I'm not sure it
would solve your issue...

--
Patrice
"John Kotuby" <jo***@powerlist.coma écrit dans le message de groupe de
discussion : eb**************@TK2MSFTNGP03.phx.gbl...
>Hi all,
I am trying to get an ASPX page written in VB and VS 2008 to open more
quickly inside of am Iframe in a standard HTML page.

One of the things the page does is to allow users to click a link that
generates an Excel file depending on the choices the suer has made on the
ASPX page. The Link doesn't actually Post the page, so I can't use the
Form fields to transmit data to the XLS creator.

So I was using Session variables. However, I think that creating a
Session causes too much overhead. Thus my question, can I use Data
Caching without a Session? When the XLS generator is called via
Hyperlink, how will it know which Cached variables it needs?

Thanks...


Aug 19 '08 #5
on 19-8-2008, John Kotuby supposed :
Thanks Hans...
When the user clicks the XLS link, I want the page to remain in the
background and the Excel file to be downloaded (or opened in Excel itself)
rather than displayed in a new page. The idea is to keep the original page in
the background while the user can perform multiple tasks. I can only get that
to work properly (so far) using a standard hyperlink.
You can do that by setting an Http header value. In the Click handler
do something like:

Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("Content-Disposition",
"attachment;filename=summary.xls"); // "save as" filename

// TODO: calculate the xls result

Response.Write(resultString);
// or Response.BinaryWrite(resultByteArray);
Response.End();

Hans Kesting
Aug 20 '08 #6
Thanks for the tip Hans. I have tried it and it works.

"Hans Kesting" <ne*********@spamgourmet.comwrote in message
news:uc**************@TK2MSFTNGP06.phx.gbl...
on 19-8-2008, John Kotuby supposed :
>Thanks Hans...
>When the user clicks the XLS link, I want the page to remain in the
background and the Excel file to be downloaded (or opened in Excel
itself) rather than displayed in a new page. The idea is to keep the
original page in the background while the user can perform multiple
tasks. I can only get that to work properly (so far) using a standard
hyperlink.

You can do that by setting an Http header value. In the Click handler do
something like:

Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("Content-Disposition",
"attachment;filename=summary.xls"); // "save as" filename

// TODO: calculate the xls result

Response.Write(resultString);
// or Response.BinaryWrite(resultByteArray);
Response.End();

Hans Kesting

Aug 21 '08 #7

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

Similar topics

11
by: brendan | last post by:
Sorry this isnt a cross post .. i just didnt get any help from alt.php. I have a website which utilises post forms for navigation in some areas. Problem is, when *some* users hit the BACK button...
2
by: Victor Fees | last post by:
I have a general question for which I would like to get some general input from the online community. I'm building an asp.net web application that will make extensive use of a SQL Server 2K...
2
by: Wee Bubba | last post by:
2 questions please: 1. At the moment I make a connection to a database whenever a user logs into my website. I run a few SQL's then store some commonly used dataTables in session objects for...
2
by: Wysiwyg | last post by:
I was hoping to get some opinions on the efficiency of various methods of reusing the same dropdown list data. Here is the situation: Multiple panels on maintenance pages with TAB menus across...
2
by: Wolter Kamphuis | last post by:
Hi all, I've got a question, not really about PHP but this is the best audience. Is anybody aware of problems with Internet Explorer not sending any get/post/cookie data? I'm the webmaster of...
34
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
0
by: jason | last post by:
hi experts, support.microsoft.com/kb/917072 and http://msdn.microsoft.com/msdnmag/issues/06/07/WebAppFollies/ As pointed out in these articles, users might get session variables belong to...
5
by: Stan SR | last post by:
Hi, Some newbie questions.. :-) First, what is the namespace to use for the Cache class ? When I use this bit of code I get an error if (Cache==null) Cache.Insert("myUserList",userlist);...
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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.