Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 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
 
Old May 25th, 2010, 02:37 AM
Authorized User
 
Join Date: Apr 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default binding gridview in webmethod?

hi every one ,

I am using modelpopupextender.this will be shown on keypress event (F2 press) using javascript. This modelpopup,targeted to panel,having a gridview where i bind data during the form view databound event.But the problem is i need to rebind the gridview when F2 is pressed,untill formview mode is not changed.This rebind is to be done bcoz, when a new record is entered in masters,it is not been shown in the gridview as post back is not happening. So i want to try it by web method. But in static webmethod,it is unable to find the gridview control. So,can anyone suggest,or send the related code to solve the problem. I hope u understood the problem.

[WebMethod(EnableSession = true)]
public static int fun()
{
//here i am unable to find the control
}

is this the right method to do?

Thanks
 
Old May 25th, 2010, 03:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Duplicate. Please see here: gridviewbind using javascript or webmethod

Can you please not post duplicate posts?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
gridview databind in webmethod swathi reddy ASP.NET 2.0 Professional 1 May 25th, 2010 03:10 AM
gridview binding vamshidhar ASP.NET 2.0 Professional 1 August 25th, 2009 09:52 AM
GridView binding with Arraylist myself.panku .NET Framework 2.0 2 November 5th, 2008 05:52 AM
Gridview problem in Binding ndramkumar ASP.NET 2.0 Professional 1 September 2nd, 2007 11:45 PM
Binding dropdownlist to gridView mcgarry101 ASP.NET 2.0 Basics 0 February 13th, 2007 07:12 AM





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