F_Name
L_Name
Index was outside the bounds of the array.
string[] names = Receiver_Id_TextBox1.Text.Split; F_Name = names[0]; M_Name = names[1]; L_Name = names[2]; cmd.CommandText = "SELECT PROFILE_ID, FIRST_NAME,MIDDLE_NAME,LAST_NAME FROM DSProfile.HDR_PROFILE WHERE FIRST_NAME='" + F_Name + "'OR MIDDLE_NAME='" + M_Name + "' OR LAST_NAME= '" + L_Name + "' "; string id = Convert.ToString(cmd.ExecuteScalar());
M_Name
string[] names = Receiver_Id_TextBox1.Text.Split; int arraySize = names.Lenth; switch(arraySize) { Case 1: //assign F_name; Break; Case 2: //assign F name & Lname Break case 3: // assign all three Break; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)