Welcome to WebmasterWorld Guest from 54.226.23.160

Forum Moderators: ocean10000

Message Too Old, No Replies

trying to display info

     
12:38 pm on Jun 28, 2010 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 24, 2005
posts:429
votes: 0


lblactive is a label on the page and I have this code on the code behind page -->

Dim dv As DataView = New DataView(cmsData)

dgItems.DataSource = dv
dgItems.DataBind()

lblactive.text = Utils.CheckForNull_Text(dv.Item("ACTIVE"), "")



but I get the error --->

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'lblactive' is not declared.

Source Error:

Line 62: dgItems.DataBind()
Line 63:
Line 64: lblactive.text = Utils.CheckForNull_Text(dv.Item("ACTIVE"), "")
Line 65: cmsData.Clear()
Line 66:


Any idea what I need to change? Seems like I have something wrong on line 64.
12:56 pm on June 28, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


Is lblactive within another control (maybe within a DataGrid?)

If so you will have to find the Label first with FindControl. In this example [webmasterworld.com] you can see how it is done with a row in a datagrid.
2:31 pm on June 28, 2010 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 24, 2005
posts:429
votes: 0


Thanks. I will review the example.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members