在代码背后获取价值! [英] Get value in code behind!

查看:69
本文介绍了在代码背后获取价值!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我想从后面的代码中的父页面(我使用母版页)的子页面中获取值.从子页面称为父页面.我该怎么做?

Hi everybody!
I want to get values from children page on parent page( i use masterpage) in code behind. From children page is called from parent page. How i can do this?

推荐答案

执行Page.FindControl()

=>
do a Page.FindControl()

=>
TextBox tbox = (TextBox)Page.FindControl("NameOfControl");
if (tbox != null)  // control is found
{
    // do with the tbox what you need
}


我找到了它
I found it here.

Let me know if you need further help.


这篇关于在代码背后获取价值!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆