Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 53427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:03:42+00:00 2026-05-10T17:03:42+00:00

I have object A which in turn has a property of type Object B

  • 0

I have object A which in turn has a property of type Object B

Class A  property x as Object B  End Class 

On my ASP.NET page when I select a gridview item which maps to an object of type A I serialize the object onto the QueryString and pass it to the next page.

However I run into problems if property x actually has some value as it looks like I exceed the QueryString capacity length of 4k (although I didn’t think the objects were that large)

I have already considered the following approaches to do this

  • Session Variables

Approach not used as I have read that this is bad practice.

  • Using a unique key for the object and retrieving it on the next page.

Approach not used as the objects do not map to a single instance in a table, they arte composed of data from different databases.

So I guess my question is two fold

  • Is it worth using GKZip to compress the querystring further (is this possible??)
  • What other methods would people suggest to do this?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:03:42+00:00Added an answer on May 10, 2026 at 5:03 pm

    If displaying the url of the next page in the browser does not matter, you could use the context.items collection.

    context.items.add('keyA', objectA) server.transfer('nextPage.aspx') 

    Then on the next page:

    public sub page_load(...)     dim objectA as A = ctype(context.items('keyA'), objectA)     dim objectB as B = objectA.B end sub 

    One reason to use this is if you want the users to believe that the next page is really a part of the first page. To them, it only appears as if a PostBack has occurred.

    Also, you don’t really need a unique key using this approach if the only way to use ‘next page’ is if you first came from ‘first page’. The scope for the context items collections is specific to just this particular request.

    I agree with the other posters who mentioned that serialized objects on the querystring is a much worse evil than using session state. If you do use session state, just remember to clear the key you use immediately after using it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Now i got it. I have to rename MySQL.ttinclude to… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer I just went through this problem 10 minutes ago and… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer You should check out the HandleError attribute. You can specify… May 12, 2026 at 1:19 am

Related Questions

I have been puzzling over a problem this morning with LinqToSQL. I'll try and
Let's say I have a Size class which has height and width properties (in
I have a web service method where I would like to throw some custom
I have these container objects (let's call them Container) in a list. Each of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.