if (!IsPostBack == true) { System.Web.UI.WebControls.Login LoginControl = (System.Web.UI.WebControls.Login)PreviousPage.FindControl("Login1"); if (LoginControl != null) { TextBox UserName = (TextBox)LoginControl.FindControl("UserName"); if (UserName != null) { superEmail = UserName.Text.ToString(); //db.command.Parameters.Add("@SupervisorEmail", SqlDbType.VarChar).Value = superEmail.ToString(); //grdView.DataSource = db.Adapter("spVerify", true); //grdView.DataBind(); lbl1.Text = superEmail.ToString(); db.command.Parameters.Add("@SupervisorEmail", SqlDbType.VarChar).Value = superEmail.ToString(); db.Adapter("spVerify", "okay", true); for (int i = 0; i < db.dataSet.Tables["okay"].Rows.Count; i++) { TableRow tr = new TableRow(); for (int j = 0; j < 5; i++) { TableCell tc = new TableCell(); if(j == 0) { tc.Text = db.dataSet.Tables["okay"].Rows[0][j].ToString(); tr.Cells.Add(tc); } if (j == 1) { tc.Text = db.dataSet.Tables["okay"].Rows[0][j].ToString(); tr.Cells.Add(tc); } if (j == 2) { tc.Text = db.dataSet.Tables["okay"].Rows[0][j].ToString(); tr.Cells.Add(tc); } if (j == 3) { LinkButton link = new LinkButton(); link.ID = "l" + i.ToString(); link.Text = db.dataSet.Tables["okay"].Rows[0][4].ToString(); link.EnableViewState = true; link.CommandName = db.dataSet.Tables["okay"].Rows[0][j].ToString(); link.Command += new CommandEventHandler(link_Command); //tc.Text = db.dataSet.Tables["okay"].Rows[0][j].ToString(); tc.Controls.Add(link); tr.Cells.Add(tc); } if (j == 4) { tc.Text = db.dataSet.Tables["okay"].Rows[0][j].ToString(); tr.Cells.Add(tc); } } tbl.Rows.Add(tr); } } } else { //Label1.Text = "Cannot find user name in Login control."; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)