N
NeilR
We have a business layer which is compiled as a dll and used across
several linked websites. Some of the website pages have search panels
with a number of controls for the user to enter search criteria. When
he clicks a search button, the panel is submitted to the business
layer, which goes through the controls, extrascts selected values and
sends them as parameters via the appropriate SQL stored procedures to
get lists of data.
This all works fine, but we are now trying to add some user controls
to give even more flexible searches. These contain several controls
feeding into a combo - eg start & end dates and project types to
filter the list of projects in the combo. The user controls have
public properties to get the selected value in these combos - eg:
intProjectID = ucProjectSelector.intIDvalue
This all works fine from the parent page - we can get the value from
the final combo in each ascx via its public property. However, when we
submit the panel to the business layer library file, it cannot access
these public properties - eg:
ElseIf TypeOf MyControl Is UserControl Then
MyUserCntrl = MyControl
'MyUserCntrl is dimmed as UserControl
intParameterValue = MyUserCntrl.intIDvalue
- - - gives the error: "intIDvalue is not a member of 'Control' "
Can anyone help us resolve this? Are we going to have no choice but to
go down the (lengthy) route of creating complied custom or composite
controls and registering a dll for these separately, or is there a
simpler way to get values from the public properties of our user
controls outside the scope of the current page? We could, of course,
add code to the pages to get the values from the user controls, and
store these in hidden controls in the panel before submitting the
panel to the library code, but this would rather negate the value of
using our business layer to extract all the values. Any brilliant
minds out there who can think of a better method?
Hopefully, Neil
several linked websites. Some of the website pages have search panels
with a number of controls for the user to enter search criteria. When
he clicks a search button, the panel is submitted to the business
layer, which goes through the controls, extrascts selected values and
sends them as parameters via the appropriate SQL stored procedures to
get lists of data.
This all works fine, but we are now trying to add some user controls
to give even more flexible searches. These contain several controls
feeding into a combo - eg start & end dates and project types to
filter the list of projects in the combo. The user controls have
public properties to get the selected value in these combos - eg:
intProjectID = ucProjectSelector.intIDvalue
This all works fine from the parent page - we can get the value from
the final combo in each ascx via its public property. However, when we
submit the panel to the business layer library file, it cannot access
these public properties - eg:
ElseIf TypeOf MyControl Is UserControl Then
MyUserCntrl = MyControl
'MyUserCntrl is dimmed as UserControl
intParameterValue = MyUserCntrl.intIDvalue
- - - gives the error: "intIDvalue is not a member of 'Control' "
Can anyone help us resolve this? Are we going to have no choice but to
go down the (lengthy) route of creating complied custom or composite
controls and registering a dll for these separately, or is there a
simpler way to get values from the public properties of our user
controls outside the scope of the current page? We could, of course,
add code to the pages to get the values from the user controls, and
store these in hidden controls in the panel before submitting the
panel to the library code, but this would rather negate the value of
using our business layer to extract all the values. Any brilliant
minds out there who can think of a better method?
Hopefully, Neil