CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 3/17/2006 11:30:15 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 17 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
vivekgrs
Asp.Net User
viewstate problem3/17/2006 11:30:15 AM

0/0

hi everybody,

             i had prepared custom paging in datagrid. for that i had used viewstate and cache. but it shows problem. while clicking the (linkbutton) next button "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount" and  clicking last button "Specified argument was out of the range of valid values. Parameter name: value ". the code which i was used is shown below. someone help me to solve it.

binddata()

Cache("allrecords") = ds

dsnew = Cache("allrecords")

viewstate("totalrecords") = dsnew.Tables(0).Rows.Count

DataGrid1.CurrentPageIndex = 0

DataGrid1.DataSource = dsnew

DataGrid1.DataBind()

totalrecords = viewstate("totalrecords")

viewstate("totalpage") = DataGrid1.PageCount

ViewState("CurrentPage") = 0

----

select case (e.commandname)

Case "next"

Dim currentpage As Integer = ViewState("CurrentPage")

currentpage = currentpage + 1

DataGrid1.CurrentPageIndex = currentpage

DataGrid1.DataSource = dset

DataGrid1.DataBind()

Case "last"

viewstate("totalpage") = totalpage

viewstate("currentpage") = totalpage - 1

DataGrid1.CurrentPageIndex = totalpage - 1

DataGrid1.DataSource = dset

DataGrid1.DataBind()

 

regards

m.arunachalam

1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. Leblond, Pages: 989, Published: 2005
Expert ASP.NET 2.0 Advanced Application Design: Advanced Application Design Authors: Dominic Selly, Andrew Troelsen, Tom Barnaby, Pages: 459, Published: 2005
Beginning ASP.NET 2.0 AJAX: Written and Tested with the Final 1.0 Release Version of ASP.NET AJAX for ASP:NET 2.0 Authors: Wallace B. McClure, Paul Glavich, Scott Cate, Steve C. Orr, Craig Shoemaker, Steven A. Smith, Jim Zimmerman, Pages: 344, Published: 2007
ASP.NET 2.0 MVP Hacks and Tips Authors: David Yack, Joe Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little, Jonathan Goodyear, Pages: 400, Published: 2006
Beginning ASP.NET 2.0 E-commerce in C# 2005: From Novice to Professional Authors: Cristian Darie, Karli Watson, Pages: 681, Published: 2005
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
The Book of VB.NET: .NET Insight for VB Developers Authors: Matthew MacDonald, Pages: 465, Published: 2002
Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Authors: Brennan Stehling, Pages: 408, Published: 2007
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006

Web:
ASP.NET 2.0: Speed Up Your Site with the Improved View State in ... NET 2.0, a short summary of the purpose and implementation of view state in the current release is in order. View state solves a very specific problem for ...
C# .NET Viewstate problem Viewstate problem. Sanjeet Koppikar posted at 24-Jan-06 10:24. I have a control called case list. Caselist contains a datagrid. In the datagrid there in an ...
Loading dynamic user controls from Page_Load cause ViewState ... Loading dynamic user controls from Page_Load cause ViewState problems. I've seen couple of post on that issue lately so I decide to comment on that Issue. ...
Postback and viewstate problem - Community Server Community Server is the platform that powers rich blogging, discussions, and sharing web communities.
Problem with ViewState ? - .NET ASP Problem with ViewState ?. Get answers to your questions in our .NET ASP forum.
ASP.Net large page size/viewstate problem : ASP.Net, Any Hello all, I have a query screen I've built using ASP.Net (Visual Studio 2005, . Net Framework 2.0) for innitiating complex queries against a database.
Dart Support Forum|PowerWEB LiveControls for ASP.NET|Viewstate Problem Topic: Viewstate Problem. wombel From: Nürnberg, Germany Posts: 55 Member Since: 09/22/05, posted June 6, 2007 4:27 AM ...
viewstate problem viewstate problem. Hi all, I am trying to save the viewstate in a session instead of storing it in a hidden of the webpage which is default. ...
If broken it is, fix it you should : A Case of Invalid Viewstate As a regular reader of your blog, I was interested in read about this viewstate problem, as we were experience a very, very similar problem last week. ...
Server Side Viewstate: ASP Alliance Net, we began to have problems with viewstate exceptions. We would receive "The View State is invalid for this page and might be corrupted" about 50 times a ...




Search This Site:










debugging error "com+ registry database detected a system error" solved

soapformatter breaking change between beta2 and release?

convert string to money datatype

toolbox in vs2005 ide

start web server without start vs 2005

assembly references problem

whatever happened to pagelayout property

question about 'publish web site'....

unable to get the 90 day trial version of vs 2005

probs with studio crashing in vb files

enterprise templates

can't update my visual studio.net 2005 to sp1, help please!

asp.net server component

email and multiple threads, seleted of listbox

code analysis and best practices

precompiling

remote creation of website - vs 2005 and vista - frontpage extensions error

developing on local server lacks intellisense and control recognition

cannot connect to database, see data sources, or see server explorer in visual studio pro 2005' solution explorer as a non-admin user

wse 3.0 and the visual studio 2005 web application project preview (beta 2)

deploy a website in more than one developer environment

failed to install msxml 6.0 parser during installation of visual studio

need help in installing vss server and client, vs.net 2003 and vs2005

shared/linked globalassemblyinfo.cs file

how to debug asp.net program with apache

documentation gone...

[howto] web setup project + database in a msi file

project configration.

previewing and printing a report in asp 2.0 with crystal reports and vs 2005

working with the tab index on autopost back using vb.net

  Privacy | Contact Us
All Times Are GMT