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

Storing structured types in request

Hi every1,

I am learning ASP.NET and came accross problem of storing my classes object
and I want its scope to be request. Is there a way do that. I found the only
way to store structured values in with scope request was with ViewState, but
for the ViewState to work the page has to post back to itself. But my page
does not posts back.

I would really appreciate your help.

Thank you very much,

Dharmesh
Nov 18 '05 #1
4 1251

"Dharmesh" <dh******@atlassoft.com> wrote in message news:e$**************@TK2MSFTNGP12.phx.gbl...
Hi every1,

I am learning ASP.NET and came accross problem of storing my classes object
and I want its scope to be request. Is there a way do that. I found the only
way to store structured values in with scope request was with ViewState, but
for the ViewState to work the page has to post back to itself. But my page
does not posts back.

I would really appreciate your help.

Thank you very much,

Dharmesh


Are you sure you need "request" scope? It's not very long, from the moment the
browser requests a url in your site to the moment the server is done processing it.
Even if the generated page contains images, those are requested via new requests.

You can add (private) variables to the page's codebehind that you can use during
processing. No concurrence problems: every request to that page gets serviced
by a new instance of this class.

Hans Kesting
Nov 18 '05 #2
Yes!! I need request scope. So do you mean to say there is no way?

Dharmesh

"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...

"Dharmesh" <dh******@atlassoft.com> wrote in message news:e$**************@TK2MSFTNGP12.phx.gbl...
Hi every1,

I am learning ASP.NET and came accross problem of storing my classes object and I want its scope to be request. Is there a way do that. I found the only way to store structured values in with scope request was with ViewState, but for the ViewState to work the page has to post back to itself. But my page does not posts back.

I would really appreciate your help.

Thank you very much,

Dharmesh


Are you sure you need "request" scope? It's not very long, from the moment

the browser requests a url in your site to the moment the server is done processing it. Even if the generated page contains images, those are requested via new requests.
You can add (private) variables to the page's codebehind that you can use during processing. No concurrence problems: every request to that page gets serviced by a new instance of this class.

Hans Kesting

Nov 18 '05 #3
Use the Items collection of HttpContext.

I have an article with some discussion:

The HttpContext Items Collection
http://odetocode.com/Articles/111.aspx

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 29 Jul 2004 11:16:33 -0500, "Dharmesh"
<dh******@atlassoft.com> wrote:
Yes!! I need request scope. So do you mean to say there is no way?

Dharmesh

"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...

"Dharmesh" <dh******@atlassoft.com> wrote in message

news:e$**************@TK2MSFTNGP12.phx.gbl...
> Hi every1,
>
> I am learning ASP.NET and came accross problem of storing my classesobject > and I want its scope to be request. Is there a way do that. I found theonly > way to store structured values in with scope request was with ViewState,but > for the ViewState to work the page has to post back to itself. But mypage > does not posts back.
>
> I would really appreciate your help.
>
> Thank you very much,
>
> Dharmesh
>
>


Are you sure you need "request" scope? It's not very long, from the moment

the
browser requests a url in your site to the moment the server is done

processing it.
Even if the generated page contains images, those are requested via new

requests.

You can add (private) variables to the page's codebehind that you can use

during
processing. No concurrence problems: every request to that page gets

serviced
by a new instance of this class.

Hans Kesting


Nov 18 '05 #4
Thank you very much scott. Your article gave me a good reference too. This
is exactly what I needed.

Thanks.

Dharmesh

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:f9********************************@4ax.com...
Use the Items collection of HttpContext.

I have an article with some discussion:

The HttpContext Items Collection
http://odetocode.com/Articles/111.aspx

HTH,

--
Scott
http://www.OdeToCode.com

On Thu, 29 Jul 2004 11:16:33 -0500, "Dharmesh"
<dh******@atlassoft.com> wrote:
Yes!! I need request scope. So do you mean to say there is no way?

Dharmesh

"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...

"Dharmesh" <dh******@atlassoft.com> wrote in message

news:e$**************@TK2MSFTNGP12.phx.gbl...
> Hi every1,
>
> I am learning ASP.NET and came accross problem of storing my classes

object
> and I want its scope to be request. Is there a way do that. I found
theonly
> way to store structured values in with scope request was with
ViewState,but
> for the ViewState to work the page has to post back to itself. But my

page
> does not posts back.
>
> I would really appreciate your help.
>
> Thank you very much,
>
> Dharmesh
>
>

Are you sure you need "request" scope? It's not very long, from the
momentthe
browser requests a url in your site to the moment the server is done

processing it.
Even if the generated page contains images, those are requested via new

requests.

You can add (private) variables to the page's codebehind that you can
useduring
processing. No concurrence problems: every request to that page gets

serviced
by a new instance of this class.

Hans Kesting

Nov 18 '05 #5

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

Similar topics

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...
4
by: Dov Moryusef | last post by:
Hi to all, Is it possible to use replication with tables which contain structured type ? I know that it’s impossible to use import/export fonctions with strutured type but I don’t know about...
4
by: nekiv90 | last post by:
Greetings, I was able to create the structured type: CREATE TYPE address_t AS ( street char(30), city char(15), state char(10), postcode smallint ) MODE...
3
by: _link98 | last post by:
Running DB2 ESE V8.1.8 on WinXP. This is Fixpak 8. Have a structured-type and some methods for that type. One of my methods needs to do insert / update on tables. The type specification...
12
by: Alex D. | last post by:
is it possible? pros and cons?
6
by: Kyle Teague | last post by:
What would give better performance, serializing a multidimensional array and storing it in a single entry in a table or storing each element of the array in a separate table and associating the...
7
by: Mike | last post by:
I have developed an application, for psyc patients.... they type in very personal information in a web form to help them work through problems in their lives. Once they enter the info, I encrypt...
1
by: peter | last post by:
Hi, I want to test using structured UDT, so I was wondering if there is some sample that give me quick understanding of what is possible for generating structured using the method specification...
4
by: rhino | last post by:
I've been looking at the information on Structured Types in the certifcation guide and have previously read it in the DB2 manuals. As neat as Structured Types are, I'm very curious to know if they...
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
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
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...
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.