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 690459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:26:18+00:00 2026-05-14T02:26:18+00:00

On my page I have n-userControls (same control) I need to communicate between them(to

  • 0

On my page I have n-userControls (same control) I need to communicate between them(to be more specific I need to pass one in value) .

I don’t want to involve the hosting page for that.

The controls acts as “pagers” and interact with the paged data on the hostin page via events that hosting page is subscribed to.
So when user click on one of the pager and changes it’s state, the other control should know about it and change itself accordingly.

I can not use VieState because viewstate is per control and so is the controlstate.

Can I use Session for that? (session is shared and there is only one value that i need to store)

Or maybe there is something better I can use? (no QueryString)

  • 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. Editorial Team
    Editorial Team
    2026-05-14T02:26:19+00:00Added an answer on May 14, 2026 at 2:26 am

    Personally there isn’t an “easy” way to do this without doing it through the controlling page, or an event.

    From what you are saying what I would envision would be something like this. Assuming two controls A and B that are your pager controls.

    The containing page subscribes to the “PageSelectionChanged” event on both controls, in response to that event it updates the data, which you already have, AND it enumerates through all pager controls setting the “Current Page” value.

    You already have event plumbing in place for communication from control -> page, use what you already have built.

    Why Not Session?

    I was asked in the comments if this would be better than session, and the answer is yes, for a number of reasons.

    1. Session information, unless explicitly cleaned up exists for the duration of a users session (typically 20 minutes)
    2. Becase of number 1, you would need to add items to the page, for if(!ispostback) to “clear” the session variables so that the user didn’t start on a different page.
    3. Future application growth, session information has to be moved out of process to SQL Server or otherwise to work in a web farm environment, for this I try to avoid it as well.
    4. Using session stores this information in memory on the webserver, although small (4 bytes if integer) it can add up and is un-necessary
    5. Depending on the nature of your updates, you cannot ensure control order with session alone to ensure that 1 control forces an update to all controls.

    There are other solutions, the solution similar to the one posted above that does a recursive look at the page, but you have to be careful with that to ensure that you do not get into a looping/endless recursion situation, in addition, if you have a lot of controls on the page, it can add a lot of overhead to constantly loop through everything.

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

Sidebar

Related Questions

I have two user controls on the same page. One contains a ListView that
I want to make use of complex usercontrols with more than one control element
I have used DependencyProperty to pass value from textbox at silverlight page to external
I have a page with many forms in panels and usercontrols, and a requiredfield
I have a page with some controls, usercontrols etc. when I change a div
I have an ASPX page and on this page I have a control that
I have a control template in one of my pages and i am assigning
I have a custom user control that I am adding to a page via
Is it possible to have two controls on one page side-by-side in Silverlight? It
How to load a user control dynamically in a page? I have a page

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.