Neeraj Pandey
What is Handler in asp.net ? what its use.
Posted by Neeraj Pandey in .Net | ASP.NET on Sep 13, 2011
0
Do you know the answer for this question? Post it below.
Guest

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

Posted by vlad on Sep 26, 2011
Sponsored by
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
Sponsored by
Team Foundation Server Hosting
Become a Sponsor
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | REPORT ABUSE © 2011 C# Corner. All contents are copyright of their authors.