Click here to Skip to main content
15,917,971 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 you 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?

Updated 24-May-10 19:26pm

1 solution

gujjula swathi wrote:
when F2 is pressed

You must be using JavaScript, right?

gujjula swathi wrote:
So i want to try it by web method

Why Webmethod? Why not Callback?

Have a look at this article[^], it would be easy to use Callback and update the grid.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900