HELP Please on Code

B

Brian Conway

Can anyone tell me where I have this code messed up. It produces no errors,
but it does nto work either. The More command seems to work just fine, but
I can't tell whether this is an accident or whether it is because it is
coded right.

private void DataGrid1_ItemCommand(object
source,System.Web.UI.WebControls.DataGridCommandEventArgs e)

{

if

(e.CommandName.Equals("FindCUID"))

{

Fleet.LDAP.AuthenticationServices User = new
Fleet.LDAP.AuthenticationServices();

DataSet dsCUID = new DataSet();

dsCUID = User.getUserInfo((string)e.Item.Cells[5].Text);

Label1.Text = vdgCUID;

e.Item.Cells[8].Text = (string)dsCUID.Tables[0].Rows[0]["sn"];//matches
dataset fields with textbox.

e.Item.Cells[7].Text = (string)dsCUID.Tables[0].Rows[0]["givenname"];

}

if (e.CommandName.Equals("More"))


{Session["xUnit"] = e.Item.Cells[1].Text;

Session["xrcCode"] = e.Item.Cells[2].Text;

Session["xLastOdo"] = e.Item.Cells[3].Text;

Session["xDriver"] = e.Item.Cells[5].Text;

Session["xFirstName"] = e.Item.Cells[6].Text;

Session["xLastName"] = e.Item.Cells[7].Text;

Session["xLocation"] = e.Item.Cells[8].Text;

Session["xHome"] = e.Item.Cells[9].Text;

Server.Transfer("ChangeForm.aspx", true);

string sUrl = "ChangeForm.aspx";

string sFeatures = "'height=600;width=400;left=100;top=50;'";

string sScript;

sScript = "<script language=javascript>" +

"window.open('" + sUrl + "',''," + sFeatures + ");"+

"</script>";

// Write it into the output stream for immediate execution

Response.Write(sScript);}

}
 
N

Nick Malik

I'm sorry Brian,
But code without a description is not very easy to understand. I need you
to tell me:
1) What you want the code to do,
2) What you observe the code doing,
3) Where you think the flaw lies, and
4) As specific of a question as you can possibly get to...

--- Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top