datalist findcontrol
-
ight, now i have tried everything that i can think of and google so can someone please help me this is what i've tried so far: ''''''''''''''''''''''''''''''''''''''' datalist1.findcontrol ''''''''''''''''''''''''''''' e.item.findcontrol ''''''''''''''''''''''''''' For I = 0 To DataList1.Items.Count - 1 Dim blk As System.Web.UI.WebControls.ImageButton = DataList1.Items(i).FindControl("Hyperlink1") blk.BorderStyle = BorderStyle.Dotted Next ''''''''''''''''''''''''''''' e.item.findcontrol("Hyperlink1") all of this stuff i've tried in the DataList1_ItemCommand. so if someone could help me, it would be greatly appreciated! Thank You for taking a look! :-D Da Intern
-
ight, now i have tried everything that i can think of and google so can someone please help me this is what i've tried so far: ''''''''''''''''''''''''''''''''''''''' datalist1.findcontrol ''''''''''''''''''''''''''''' e.item.findcontrol ''''''''''''''''''''''''''' For I = 0 To DataList1.Items.Count - 1 Dim blk As System.Web.UI.WebControls.ImageButton = DataList1.Items(i).FindControl("Hyperlink1") blk.BorderStyle = BorderStyle.Dotted Next ''''''''''''''''''''''''''''' e.item.findcontrol("Hyperlink1") all of this stuff i've tried in the DataList1_ItemCommand. so if someone could help me, it would be greatly appreciated! Thank You for taking a look! :-D Da Intern
Object reference not set to an instance of an object. ha ha......i forgot the error!!! Da Intern
-
ight, now i have tried everything that i can think of and google so can someone please help me this is what i've tried so far: ''''''''''''''''''''''''''''''''''''''' datalist1.findcontrol ''''''''''''''''''''''''''''' e.item.findcontrol ''''''''''''''''''''''''''' For I = 0 To DataList1.Items.Count - 1 Dim blk As System.Web.UI.WebControls.ImageButton = DataList1.Items(i).FindControl("Hyperlink1") blk.BorderStyle = BorderStyle.Dotted Next ''''''''''''''''''''''''''''' e.item.findcontrol("Hyperlink1") all of this stuff i've tried in the DataList1_ItemCommand. so if someone could help me, it would be greatly appreciated! Thank You for taking a look! :-D Da Intern
Hi there. Are you sure the error is happening in the For/Next block? Though this shouldn't be the cause of the error, I think you may need to cast the
FindControl()
result to anImageButton
with aCType()
function. -
Hi there. Are you sure the error is happening in the For/Next block? Though this shouldn't be the cause of the error, I think you may need to cast the
FindControl()
result to anImageButton
with aCType()
function.tried that too...........still doesn't work Da Intern
-
tried that too...........still doesn't work Da Intern
Hi there. Can you post the full code and the specific lines causing the exception in context?
-
Hi there. Can you post the full code and the specific lines causing the exception in context?
MFS Menu Security - Update Capability - Please check all that apply
Public Sub DataListSS_ItemCommand(ByVal Sender As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataListSS.ItemCommand Dim rsChkBox As SqlDataReader = objChkBox.sProc_McCracken_ScreenSecurity_Options(e.CommandArgument.ToString()) While rsChkBox.Read CType(Page.FindControl("chkboxSS"), CheckBoxList).Items.Add(rsChkBox("options")) End While so what im tryin to do is have a datalist containing a column called screen which is a link button then from click of one of those individuals screens you get the options in a checkboxlist both the screen and options are on a sql database can you help:-D Da Intern
-
MFS Menu Security - Update Capability - Please check all that apply
Public Sub DataListSS_ItemCommand(ByVal Sender As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataListSS.ItemCommand Dim rsChkBox As SqlDataReader = objChkBox.sProc_McCracken_ScreenSecurity_Options(e.CommandArgument.ToString()) While rsChkBox.Read CType(Page.FindControl("chkboxSS"), CheckBoxList).Items.Add(rsChkBox("options")) End While so what im tryin to do is have a datalist containing a column called screen which is a link button then from click of one of those individuals screens you get the options in a checkboxlist both the screen and options are on a sql database can you help:-D Da Intern
MFS Menu Security - Update Capability - Please check all that apply Public Sub DataListSS_ItemCommand(ByVal Sender As Object, ByVal e As DataListCommandEventArgs) Dim objChkBox As New LibrariesDB Dim rsChkBox As SqlDataReader = objChkBox.sProc_McCracken_ScreenSecurity_Options(e.commandargument.tostring) Binddatalist() While rsChkBox.Read CType(Page.FindControl("chkboxSS"), CheckBoxList).Items.Add(rsChkBox("options")) End While
Da Intern