• UserControl with GridView rowCommand not fired foman


      问题:在page.aspx 中 ,添加了一个webUsercontrol,userControl 中有一个gridview,gird中有一个带有button的模           版, 当点击button时,gridview 没有触发rowCommand事件,而再次点则会触发。
     解决方法: 没找到什么好方法。一个简单方法是在 usercontrol load 时,不管是否是 postback ,都去 rebind datasource to gridview。当然可以把datasource 缓存在session中,避免重复连接数据库。
  • 相关阅读:
    12.1
    我的火车头
    头文件优化时间
    一些姿势
    CodeForces
    CodeForces
    [SDOI 2015] 约数个数和
    BZOJ
    [国家集训队] middle
    鹅的问题
  • 原文地址:https://www.cnblogs.com/foman/p/1578936.html
Copyright © 2020-2023  润新知