Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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
 
Old June 26th, 2007, 01:42 AM
Authorized User
 
Join Date: May 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DarkForce
Default Redirect to the laste page of GridView1

Hi, i want to insert a new record into my gridview on "gridview.aspx" from "insertticket.aspx".
how can i set the gridview to display the last page index after the redirect?

So long
__________________
Ivan
 
Old June 26th, 2007, 03:15 AM
Authorized User
 
Join Date: May 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DarkForce
Default

Sorry for the wrong spelling. It should be
'last page'.
Aktually i solved the problem by writing a small if-statement.
         GridView1.PageSize = Int16.MaxValue;
            float i = GridView1.Rows.Count;
            float k = i / 10;
            int m = (int)k;
            if (m < k)
                m = m + 1;
            GridView1.PageSize = 10;
            GridView1.PageIndex = m;

but i still have the problem, that i want a reference to the last value in my gridview without selecting it first.
Like: gridview1.selectedvalue= max should deliver 306 .
or GridView1.lastindex = i => 306

any ideas?

So long





Similar Threads
Thread Thread Starter Forum Replies Last Post
Page redirect help jroxit Classic ASP Basics 7 August 11th, 2008 11:01 AM
redirect to page other than default page sarah lee ASP.NET 1.0 and 1.1 Basics 3 December 15th, 2006 05:45 PM
Redirect to new page without closing current page peter2004 ASP.NET 2.0 Basics 5 June 5th, 2006 08:49 PM
Redirect page Warbird Classic ASP Basics 4 June 20th, 2003 07:51 PM





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