A页面有个按钮“确定”,B页面的datagrid绑定数据。点击“确定”,B页面的datagrid从新绑定!该如何实现啊?

解决方案 »

  1.   

    frames["b"].document.reload()
    或者frames["b"]._DoPostBack()具体参数自己可以运行后看看B的源代码
      

  2.   

    在确定事件里
    //WebRequest 在System.Net命名空间里
    WebRequest  request = WebRequest.Create(url);//此url为你b页面的url地址这样相当于重新加载b页面;但没有显示b页面不知道这样可不可以
      

  3.   

    using System;
    public delegate void MyDelegate();   // delegate declarationpublic interface I 
    {
       event MyDelegate MyEvent;
       void FireAway();
    }public class MyClass: I 
    {
       public event MyDelegate MyEvent;   public void FireAway() 
       {
          if (MyEvent != null)
             MyEvent();
       }
    }public class MainClass 
    {
       static private void f() 
       {
          Console.WriteLine("This is called when the event fires.");
       }   static public void Main () 
       {
          I i = new MyClass();      i.MyEvent += new MyDelegate(f);
          i.FireAway();
       }
    }这是msdn的一个小例子,利用委托可以解决你的问题