protected void Page_Load(object sender, EventArgs e) { UserInformationDataSetTableAdapters.MemberTableAdapter mta; mta = new UserInformationDataSetTableAdapters.MemberTableAdapter(); profileListView.DataBind(); string vUsername = Session["username"].ToString(); profileListView.DataSource = mta.GetDataByUsername(vUsername); profileListView.DataBind(); }
protected void fCheckAvailabilityButton_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); string vUsername = fUsername.Text.Trim(); UserInformationDataSet.MemberDataTable mdt; UserInformationDataSetTableAdapters.MemberTableAdapter mta; mta = new UserInformationDataSetTableAdapters.MemberTableAdapter(); mdt = mta.GetDataByUsername(vUsername); if (mdt.Rows.Count > 0) { fStatus.Text = "Not Available"; } else { fStatus.Text = "Available"; } }