如何在另一个页面中找到控件 [英] How to find control in another page
本文介绍了如何在另一个页面中找到控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
i有两个页面,如onepage.aspx,twopage.aspx,在onepage.aspx中有标签,按钮如何在twopage.aspx中找到这些控件页面。
在onepage.aspx中有按钮,还有button_click事件。如何在twopage.aspx页面中点击或不点击这个按钮。请告诉我任何一个。
谢谢
解决方案
只需使用 Page.FindControl Method [ ^ ]
请参阅 -
http:// forums.asp.net/t/953114.aspx/1 [ ^ ]
您在使用时只能从第一页到第二页找到控件
服务器.Transfer(secondpage.aspx);
和第二页
Page.PreviousPage.FindControl( 控件名称)
Hello all,
i have two pages like onepage.aspx, twopage.aspx, in onepage.aspx have lable, button how find these control in twopage.aspx page.
In onepage.aspx have button,and button_click event also . how to find this button is clicked or not in twopage.aspx page.Please tell me any one.
Thanks
解决方案
Simply use Page.FindControl Method[^]
Refer this-
http://forums.asp.net/t/953114.aspx/1[^]
you can only find controls from first page to second page when you are use
Server.Transfer("secondpage.aspx");
and on second page
Page.PreviousPage.FindControl("ControlName")
这篇关于如何在另一个页面中找到控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文