下一行..有什么用? [英] What is the use of following line ..?

查看:65
本文介绍了下一行..有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文字ltrlCloseWindowText =(文字)this.Page.Master.FindControl("ltrlCloseWindowText");

Literal ltrlCloseWindowText = (Literal)this.Page.Master.FindControl("ltrlCloseWindowText");

推荐答案

从下至上阅读.希望您能理解这个奇怪的书面解释.如果没有让我知道,我会尝试将其放入另一种形式.

P.S.我打破了代码行并解释了每个部分.
Read from bottom to top. I hope you will understand this weirdly written explanation. if not let me know and I will try to put it in another form.

P.S. I broke the line of code and explained each segment.
// 4. create a literal control variable to hold a literal control we find from somewhere else
Literal ltrlCloseWindowText 

// 3. assignment
 =
// 2. type cast the generic control type to literal control
 (Literal) 

// 1. Find a control names ltrlCloseWindowText in the masterpage associated with this page.
this.Page.Master.FindControl("ltrlCloseWindowText"); 


简而言之,我们想在masterpage 中找到与名为ltrlCloseWindowText的文字控件关联的值,并在内容页面中使用它.


in short, we want to find the value associated with some literal control named ltrlCloseWindowText in masterpage and use it in content page.


它进行搜索,如果找到,则返回ID为ltrlCloseWindowText的控件.该控件应为Literal控件类型.

参考:
http://msdn.microsoft.com/de-de/library/vstudio/486wc64h.aspx [^ ]
It searches for and if found returns the control with ID ltrlCloseWindowText. The control is expected to be of control type Literal.

Refer to:
http://msdn.microsoft.com/de-de/library/vstudio/486wc64h.aspx[^]


这篇关于下一行..有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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