Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 1st, 2006, 06:30 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default Urgent Issue to be sorted out

Hi friends/parsons

I have a usercontrol for pagination, in that control I pass the datagrid reference. There is an event handler within that usercontrol that is used to bind the grid. The user control has the following options:

First, Prev, Next, Last, a dropdown showing pages out of total pages and a label showing total no of records out of total records.

Everything works fine till I place a single usercontrol for the grid on that page, but if I place 2 usercontrols of paging (on top and bottom) to the same grid on the same page, only that control is affected on which I click, i.e. if I click on the usercontrol placed on top of the grid, total records, dropdown index changes for that control only, not for the control that I placed below the grid.

Any help would be appreciated.


Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
__________________
Regards
Mike
  #2 (permalink)  
Old November 1st, 2006, 08:35 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Well, unless you link the 2 user controls together somehow (like control 1 raises an event in control 2) how does control 2 even know how/when to change?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
  #3 (permalink)  
Old November 1st, 2006, 09:35 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yup

I can understand that, but any ideas you can suggest to do this???

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
  #4 (permalink)  
Old November 1st, 2006, 09:46 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You might want to try making the entire page a user control, it would be much eaiser to raise events of other objects if you had it that way.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
  #5 (permalink)  
Old November 1st, 2006, 10:43 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanx parsons

Rather than not starting a new thread, can u tell me is it possible to maintain the value of hidden during postback, i.e. I have set some value in a hidden control, now when I press F5, the value of hidden is lost, is this working correct or am I doing something wrong.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
  #6 (permalink)  
Old November 1st, 2006, 10:52 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It depends. If it is a dynamic control and you recreate it everytime your form is lost, then you will have to get the value at form post, capture the value, then recreate your control, and then populate the control with your value.

Otherwise, as long as the value is being run as server control, it *should* be participating in view state.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature


Similar Threads
Thread Thread Starter Forum Replies Last Post
Com issue(really urgent) balesh.mind ASP.NET 2.0 Professional 2 May 14th, 2008 03:35 AM
jk connector URGENT ISSUE supreet Apache Tomcat 1 March 31st, 2007 11:56 AM
V V V Urgent::Crystal report format issue narayanark2003 Crystal Reports 0 July 6th, 2006 07:58 AM
DEADLOCK issue - URGENT! Ron Howerton SQL Server ASP 3 August 9th, 2005 04:33 PM
sorted table crmpicco Javascript How-To 0 March 17th, 2005 10:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.