0
我有一个UserControl,其中包含gridview.I注册这个usercontrol到一个页面aspx normal.But它设置str_btn一直null当我按下选择在GridView。如何从代码隐藏中获取UserControl中的GridView事件
if(!Page.IsPostBack)
{
}
else
{
string str_btn = null;
if (Request.Form.Keys[Request.Form.Keys.Count - 1]!=null)
str_btn=Request.Form.Keys[Request.Form.Keys.Count - 1].ToString();
if(!string.IsNullOrEmpty(str_btn))
handleClick(str_btn);
}
如何从aspx页面在usercontrol中获取Gridview事件?
感谢您的帮助。
哪里是在你的代码的用户控制..?你怎么加载/注册用户控件..?你能否请出示与你的问题有关的相关代码......? – MethodMan
感谢您的支持,兄弟。我有2个链接详细解释这个问题。 http://stackoverflow.com/questions/14189851/cant-access-gridview-event-at-usercontrol-by-codebehind/14190246#comment19673274_14190246 – Brian
http://stackoverflow.com/questions/14150848/get-gridview-in-多用户控制从代码隐藏/ 14150889#comment19599867_14150889 – Brian