主页一个treeview  点以后再 iframe 中 调用子页 子页中进行修改,子页点击确定按钮 以后想要刷新主页中的treeview 控件 如何做???

解决方案 »

  1.   

    主页中一个treevie 点击节点以后 iframe 调用子页也是内容,子页进行修改以后  点确定按钮 刷新主页的treeview如何做
      

  2.   

    直接刷新父页面可以不?
    top.location.href = top.location.href;top.location.reload();
      

  3.   

    reload or reset location.href is like another GET, if you need to keep the current view state but modify some other parts, you can use javascript inside your IFRAME:parent.document.forms[0].submit();orparent.document.getElementById("SomeButtonID").click();
      

  4.   

    同意思归,使用top.location.href = top.location.href;会使treeview的视图状态丢失。
      

  5.   

    parent.document.forms[0].submit();   怎么设置呢??
      

  6.   

    in your 子页void Page_Load(Object sender, EventArgs e)
    {
      YourButton.Attributes["onclick"] = "javascript:parent.document.forms[0].submit(); return false;";
    }
      

  7.   

    使用top.location.href = top.location.href;会使treeview的视图状态丢失。  丢失也没有事 我要重新邦定树的
    top.location.href = top.location.href  那里设置呢??
      

  8.   

    因为我用的是toolbar 按钮 所以没有办法直接
      YourButton.Attributes["onclick"] = "javascript:parent.document.forms[0].submit(); return false;";我放在这里 出错                Page.RegisterStartupScript("q", "<script language=javascript>javascript:parent.document.forms[0].submit(); return false;</script>")
      

  9.   

    saucer(思归)  大哥 能不能推荐一本学习好html javascript的书!谢谢
      

  10.   

    1.RegisterStartupScript("key", "<script>window.parent.contents.location.replace('../treeview.aspx');</script>")
      

  11.   

    我有一个chm格式的javascript手册 请留email
      

  12.   

    Page.RegisterStartupScript("q", "<script language=javascript>parent.document.forms[0].submit();</script>")the ultimate reference:
    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp
      

  13.   

    RegisterStartupScript("key", "<script>window.parent.contents.location.replace('../treeview.aspx');</script>")
    提示window.parent.contents.location 为空或者不是对象
      

  14.   

    [email protected]  goody9807() 谢谢你
      

  15.   

    Page.RegisterStartupScript("q", "<script language=javascript>parent.document.forms[0].submit();</script>") 思归大哥的这个方法解决了 谢谢您
    另外请教您能不能介绍一些将上面这些语句的书呀谢谢!!
      

  16.   

    问题解决揭帖了
    msdn 有时间一定要看