hi,
i am doing a search application in that i want to retrieve the data from the database,data means username and userid ,if i binded username its bonding to textbox,my requirement is i have to take userid also along with username but only username have to bind to textbox and userid have to use in someother place,
how can i get,
code:
public List<string[]> GetUsers(string SearchText)
{
List<string[]> result = new List<string[]>();
clsGlobal objglobal = new clsGlobal();
DataSet dsUsername;
dsUsername = objglobal.search(Session["RoomID"].ToString(), SearchText);
foreach (DataRow dRow in dsUsername.Tables[0].Rows)
{
string[] str = new string[2];
str[0] = dRow["Username"].ToString();
str[1] = dRow["UserID"].ToString();
result.Add(str);
}
return result;
}
Thanks in advance,
Naseer