Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > Visual Web Developer 2005
|
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 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 23rd, 2011, 08:44 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Unhappy Gridview Pagination PostBack Issue

Hi,

I have a Gridview with 4 columns, NAME , DATE OF BIRTH, HOBBIES & TEAM.
When the Page loads all the Employees of All teams are displayed in GridView.

I have put a DROPDOWN BOX on Top of this Gridview, through which User can Select a TEAM & a BUTTON beside it. When User Selects one TEAM from DropDown & Click's the BUTTON, I have written the following code:-

protected void Button1_Click(object sender, EventArgs e)
{
string TeamSelected;
TeamSelected = SearchDropDown.SelectedItem.ToString();
Menu.SelectCommand = "SELECT [Emp_id], [Emp_fullname], [Emp_prefname], [Emp_hobbies], [Emp_birthday], [Emp_team] FROM [Employee] WHERE [Emp_team]='" + TeamSelected + "'";

}

Its all working fine. But the problem arises when User clicks on PAGINATION, if the User clicks on PAGE no. 2, then again All the TEAMS are shown in GridView.

I disabled the VIEWSTATE, , it didn't worked for me.

Any Solution Pls.

Thannk u....!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
gridview postback benordz C# 6 April 10th, 2008 01:46 AM
Postback issue while selecting a parameter sonusarojan Reporting Services 2 May 15th, 2007 09:41 PM
Postback issue while selecting a parameter sonusarojan BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 March 21st, 2007 01:30 AM
Custom Postback and Gridview refresh wirerider ASP.NET 2.0 Basics 5 February 28th, 2006 04:33 PM
postback issue with drop downlists emachines General .NET 1 January 9th, 2005 09:42 PM





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