If I have a fucntion that gets 2 values from a database and I awnt to return them, how can I return them both?<BR><BR>I set something like this up...<BR><BR>string strPassWd, strUserID = ForgotPassword(txtUserId);<BR><BR>and then in the function I had<BR>return "asdf"; <BR>return "asdf"; <BR><BR>but it did not work... can this be done?<BR><BR>Thanks<BR><BR>L<BR><BR>It can be done by passing your arguments by reference. <BR><BR>Public Sub FcnXXX(ByRef x as string, byref x2 as string)<BR> x = "asdf1"<BR> x2 = "asdf2" <BR>End Sub<BR><BR>Whatever parameters you pass into the calling function, you can use those variables after the function has completed it processing.I am assuming c# because it looks like c#:<BR><BR>// use the out keyword<BR>public void example(string strPassWd, out string outVar, out string outVar2)<BR>{<BR><BR>outVar = "asdf";<BR>outVar2 = "qwerty";<BR>return null;<BR><BR>}<BR><BR><BR><BR>BTW, when you see multiple return vals its usually a case of bad OOP design. You might want to create a struct/class that can hold the values you want instead and return that....