确定回发(从linkbutton或treeview节点) [英] determining postback (from linkbutton or treeview node)
本文介绍了确定回发(从linkbutton或treeview节点)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我的页面上有treeview和Linkbutton,在page_load上我想确定回发是来自Linkbutton还是Treeviw.
请帮助.
Hello,
I am having treeview and Linkbutton on my page, on page_load i want to determine whether the postback is from Linkbutton or Treeviw.
Plz help.
推荐答案
HI .. @ Deepak
很好的问题..
您可以在此页面上使用以下方法
假设您具有ID为"lnktest"的链接按钮
HI..@Deepak
Very good question..
You can use the following page mathod for this
suppose you have link button with id "lnktest"
string ctrlname = Page.Request.Params["__EVENTTARGET"];
if (ctrlname.Contains("lnktest"))
{
////////////////place your activities
}
else
{
////////////////place your activities
}
希望对您有帮助
谢谢
Hope it will help you
Thanks
这篇关于确定回发(从linkbutton或treeview节点)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文