1
Reply

What is Handler in asp.net ? what its use.

Neeraj Pandey

Neeraj Pandey

Sep 13, 2011
9.4k
0

    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 ...

    vlad
    September 26, 2011
    0