Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Literal ltrlCloseWindowText = (Literal)this.Page.Master.FindControl("ltrlCloseWindowText");
Posted 7-Nov-12 22:37pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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"); 
in short, we want to find the value associated with some literal control named ltrlCloseWindowText in masterpage and use it in content page.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 325
1 DamithSL 265
2 CPallini 235
3 Sergey Alexandrovich Kryukov 229
4 Maciej Los 190
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100