Custom Paging In User Control

Hi All

I am stuck with a scenario described below.
I have a user control for custom paging.The user control contains a dropdown and four link buttons for previous/next/first and last navigation.The dropdown contains the page size.

I have two instances of the same paging user control on the main page.The problem is when the user selects the page size from the first instance the pagesize is set in the usercontrol as dropdown.selectedvalue.

But if the user do some navigation from the second instance of the user control it will have the page size as some other value i mean the dropdown value of the second instance.

Please help me on how to achieve synchronisation.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It sounds like you want the page size to be the same on both controls(?) If so you can fix this in several says: (1) make the page size variable static with the 'static' keyword or (2) on the main page if the page size of one control changes, the handler method changes the value of the other control or (3) keep a static list of instances of the control and if one changes, have it automatically change the other instances.

If I've misunderstood your question (which is entirely likely!) please tell what you expect to have happen. Personally, I totally don't understand why you would want two instances of this control on one page.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
manishk1111Author Commented:
The problem is solved for me where i do expose a property from the user control and set the page size on first instance and use the value for the second instance as well.No need to use even the static variable.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.