Forum Moderators: open

Message Too Old, No Replies

trying to display info

         

hal12b

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

10+ Year Member



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.

marcel

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

WebmasterWorld Senior Member 10+ Year Member



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.

hal12b

2:31 pm on Jun 28, 2010 (gmt 0)

10+ Year Member



Thanks. I will review the example.