Contents tagged with Asp.net

  • Two ways to make CommandArgument have value in GridView

    We all know that CommandArgument Property can remember value or index, but sometimes, there's nothing in it, do you know why?
    Today, i study for a while, and i find the following two ways.

    • Use <asp:ButtonField CommandName="CMD" />, the CommandArgument will memory the RowIndex of the GridView automatically.
    • Use <asp:TemplateField><ItemTemplate><asp:Button CommandName="MCMD" CommandArgument="Value"  /></ItemTemplate></asp:TemplateField>, the Argument value is Value

  • ModelPopupExtender的一个问题解决方案

          最近用ModelPopupExtender时,总是提示我有 Sys.InvalidOperationException 未通过 Sys.UI.DomEvent.addHandler 的错误,后来发现是我设置了CancellControlID,而没有设置相应的事件,我是通过在服务器端Show和Hide来控制的,这样脚本在寻找CancellControlID的时候就找不到了,就为null,在脚本中就会抛出以上错误。所以,如果我们要在服务器端控制ModelPopupExtender,不要设置ControlId就可以了!

  • Asp.Net Web开发需要了解的知识

           很久没有做Web开发了,本以为有以前的基础加上WinForm的开发经验,Web应该不是什么问题的,应该很Easy。但是现在我发现我错了,Web开发已经不是简单的事情了。现在Web开发出来的一些优秀产品已经比较接近WinForm了,这就提高了Web开发的门槛。所以,现在如果我们想做好Web的开发,至少应该了解以下几方面的开发知识: