• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help with vb.net problem !!

eraser

Senior member
Here is what I would like to do.

I would like to create a constant in vb.net that I could make reference to in various locations throughout my code. Below is a constant that I already make reference to throughout for my table name in the database.


Const dbTable As String = "Mailing List"

I would like to go from this:
If Me.BindingContext(DsAddressBook, dbTable).Position = 0 Then
Me.BindingContext(DsAddressBook, dbTable).Position -= 1


To this:
If Me.bxAddressBook.Position = 0 Then
Me.bxAddressBook.Position -=1


bxAddressBook = BindingContext(DsAddressBook, dbTable)


How would I go about achieving this. Help, or even thoughts would be appreciated.

Eraser.
 
Just create a property of the same type that BindingContext returns. Name the property bxAddressBook. Have the property return the results of calling BindingContext(DsAddressBook, dbTable).
 
Back
Top