Looks to me that it prints the code of the label but it's empty at this time... OR that this code is never actually executed. Try printing out a few non-space characters before and after the label text like: Response.Write("*** "+lb.Text+" ***"); Now if you see some asterisks in the result then you know it's printing empty label. Then you have to figure out when this code is executed and what you actually have on this label. If you can't see any asterisks then obviously this code never gets executed... HTH
N
nsimeonov
@nsimeonov
Posts
-
could everyone show me the way to change CType in VB.NET to C#? -
could everyone show me the way to change CType in VB.NET to C#?Try: Label lb = (System.Web.UI.WebControls.Label)dgItem.FindControl("lblCompanyName"); Response.Write(lb.Text); HTH