countrymeister
asked on
How to invoke a checkbox change event within code behind
I have an ASP.NET page, I have a checkbox which has a checkbox change event.
How do I trigger a checkbox change event from code behind.
I tried to add this line in one of my methods to inovke the changed method
But it fails with object reference set to an instance of an object, because the value of System.Web.HttpUtility.Url Decode(Req uest.Form( "__EventTa rget")) is Nothing
cbDetailOrder_SelectedInde xChanged(c bDetailOrd er, New EventArgs())
Protected Sub cbDetailOrder_SelectedInde xChanged(B yVal sender As Object, ByVal e As System.EventArgs) Handles cbDetailOrder.SelectedInde xChanged
If System.Web.HttpUtility.Url Decode(Req uest.Form( "__EventTa rget")).En dsWith(cbD etailOrder .ID) Then
'blah blah
end if
End SUb
How do I trigger a checkbox change event from code behind.
I tried to add this line in one of my methods to inovke the changed method
But it fails with object reference set to an instance of an object, because the value of System.Web.HttpUtility.Url
cbDetailOrder_SelectedInde
Protected Sub cbDetailOrder_SelectedInde
If System.Web.HttpUtility.Url
'blah blah
end if
End SUb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
carl_tawn:
I need to invoke the checkbox changed event, not sure if I can use Page,RegisterClientScript or somehow get the document checkbox changed event.
I have a link on a another page, which uses the query string to pass the order id. and on getting the order id I want to use cb_changed event to load the details of the orderid passed
I need to invoke the checkbox changed event, not sure if I can use Page,RegisterClientScript or somehow get the document checkbox changed event.
I have a link on a another page, which uses the query string to pass the order id. and on getting the order id I want to use cb_changed event to load the details of the orderid passed
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't think any one of them answered my question
ASKER
If I do the following
cbDetailOrder_SelectedInde
as I already mentioned it fails
because the EVENTTARGET is empty