I can already pass the ID of the User who log's in, Here is my code:
var data1 = data.Where(x => x.uname == pUser.Text && x.pword == pPass.Text).FirstOrDefault();
if (data1 != null)
{
Toast.MakeText(this, "Login Success", ToastLength.Short).Show();
Intent user = new Intent(this, typeof(userProfile));
user.PutExtra("Id", data1.id.ToString());
StartActivity(user);
}
else
{
Toast.MakeText(this, "Username or Password invalid", ToastLength.Short).Show();
}
}
catch (Exception ex)
{
Toast.MakeText(this, ex.ToString(), ToastLength.Long).Show();
}
Here is my activity where i receive the ID:
Intent i = this.Intent;
String name = i.Extras.GetString("Id");
String img = i.Extras.GetString("img");
viewID.Text = name;
How to get the data of the User who log's in using the ID i passed?
Thanks in advance