!IsPostBack树视图 [英] !IsPostBack treeview

查看:63
本文介绍了!IsPostBack树视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在加载时使用treeview甚至在绑定treeview时
在那个

 受保护的 无效 HeadCreationTV_Load(对象发​​件人,EventArgs e)
{
    如果(!IsPostBack)
    {
        GetTreeViewBind();

    }
} 




但是在保存按钮中保存了一些值后,我必须再次重新加载树.
我遇到了问题,因为我给了!ispostBack,如果不给我!isPostBack树视图每次都在显示,则向下拖动选定的索引更改等..

有什么解决办法吗?

解决方案

如果您需要在单击按钮后重新加载树,然后在按钮单击处理程序中调用GetTreViewBind.

您可能还想熟悉此 ASP.NET页面生命周期概述 [ ^ ]


hi
am using treeview on load even am binding treeview
in that

protected void HeadCreationTV_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        GetTreeViewBind();

    }
}




but after saving some values in save button click i have to reload tree once again.
i got problem because i gave !ispostBack ,if am not giving !isPostBack treeview is binging every time ,drobdown selected index change etc.....

is there any solution

解决方案

If you need to reload the tree after the button click then call GetTreViewBind in the button click handler.

You may also want to familiarize yourself with this ASP.NET Page Life Cycle Overview[^]


这篇关于!IsPostBack树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆