Neeraj Pandey
What is Handler in asp.net ? what its use.
By Neeraj Pandey in ASP.NET on Sep 13 2011
  • vlad
    Sep, 2011 26

    Kevin, not sure if you found the answer yet or not, BUT


    from the attached files it is not clear how do you compile the EXE  in the not working app. but I suspect that when you compile as DLL and call it from EXE  your form object gets new hidden  instance every call and that new instance is what getting filled with the values.

     IMHO it would be better to change the "City"  function  so you are passing the value of "Form1.cbCities.Text"  into the function  and the function returns back the text you need 

    something like this

    Public Shared
    Function City(cities As String, state As String) As String
    Dim result As String = ""

    Select Case cities
    Case "Chicago"
    result = state & "- North Division"
    Case "New York"
    result = state & "- Northeast Division"
    Case "Miami"
    result = state & "- Southeast Division"
    Case "Dallas"
    result = state & "- MidSouth Division"
    End Select

    Return result
    End Function


    Call it from the form as 


    form1.txtCombined.Text = cities.City(cbCities.Text,txtState.Text)


    this should work ...

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS