473,769 Members | 4,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView and DataPager Control Problem

111 New Member
Hi,

I am using listview control for display. And I am using LINQ for binding the datasource to the listview control at the codebehind. I have implemented the paging in the listview control using the DataPager. But its not working properly. Whn I am clicking twice then i am able to navigate to the next page. I tried to bind the data in the prerender event but that too doesnt working.

Why can this be happening. Can any one help me to solve the problem.
Thanks in advance.

Thanks
Bharath Reddy VasiReddy
Jul 8 '08 #1
1 4920
bharathreddy
111 New Member
I am getting this error after second page navigation: (Note: second page navigation is performed when i click the next button twice).

Microsoft Jscript runtime error:
Sys.WedForms.Pa geRequestManage rServerErrorExc eption: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Thanks
Bharath Reddy VasiReddy
Jul 8 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1059
by: shapper | last post by:
Hello, I created a ListView with a DataPager associated with it. The ListView renders as a table but I suppose it is irrelevant for the problem I describe here. I moved the ListView to a page, let's say 10. Then I deleted all elements of this page.
1
3019
by: shapper | last post by:
Hello, I have a ListView where I use LINQ for data, for example, selecting, and deleting. In the ListView item template I added a DataPager. When I click, for example, "Next Page" or a page number in the DataPager something strange happens: It always takes me 2 clicks for the action to be taken.
0
2918
by: George Ter-Saakov | last post by:
Trying to quickly create paginated grid. So i am using ListView. Unfortunatelly pagination works a little strange. Pagination control appears correctly. But when i click "2" page postback happens but current page is still first page. Then i click "3" page. Postback happens but current page is now "2" page. Then i click "4" page and again postback happens and page 3 becomes current. Why is that? How to make it work?
5
9537
by: Mark Olbert | last post by:
How do I get the DataPager and ListView to play nice together when I use a custom datasource? In my webpage, I use linq to pull data from a SqlServer database and assign the resulting IEnumerable<to the ListView's Datasource property. This all works fine to display the first 3 items (the DataPager is set to display three items at a time), but when I click on the next page in the DataPager...nothing happens. There's a roundtrip to the...
0
2380
by: DJOuk | last post by:
Posted this on Asp.Net, seems to be a hard problem, I still can't work it out I have a edit button, this works fine, until I add the code that prevents the edit button from being seen by users who did not post that ticket. I cannot understand why this is happening. I get an error on the button says 'object reference not set in instance of object' It happens when I add the following code:
4
4516
by: Brian Gaze | last post by:
I have created a ListView control and have bound this to a datasource. Within the ItemTemplate of the ListView I have added another ListViewControl which is databound in the code behind. The idea is that when clicking on the "Show details" button the ListView for the appropriate row binds in the codebehind and displays the detail data for the selected row. I did something similar with a gridview control previously, but want to be able to...
0
1452
by: =?Utf-8?B?b3R0b21hdGlj?= | last post by:
Howdy, I have a site with a DIV that contains a ListView. The size of the DIV is so that exactlly three items can fit inside of it, so I use a DataPager to page it. When user calls new and the InsertItemTemplate appears the items gets outside the DIV - not good. Is there a way to clear all items and only show InsertItemTemplate when inserting, no other items? I'm going bananas here...thanks in advance!
0
1645
by: thami | last post by:
hello my probleme is : i have a listview with a datapager control that allow to paginate my listview the all in updatepanel i want to be able to paginate from one rows to other in the listview without postback all my page
2
6466
by: sundaramails | last post by:
I am using DataPager in ListView. I put ListView In Infragistics Asynchronous Refresh Panel & Datapager in Update Panel. I have a button in Listview control(Run by client Script). When i click the button data pager shows twice in listview. Also data pager number when i click second time thatz run? Please Help...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10212
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9995
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.