Click here to Skip to main content
15,907,913 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: loading COM object from aspx Pin
minhpc_bk27-Sep-06 21:48
minhpc_bk27-Sep-06 21:48 
GeneralRe: loading COM object from aspx Pin
thebread27-Sep-06 22:44
thebread27-Sep-06 22:44 
GeneralRe: loading COM object from aspx Pin
minhpc_bk28-Sep-06 0:51
minhpc_bk28-Sep-06 0:51 
GeneralRe: loading COM object from aspx [modified] Pin
thebread28-Sep-06 2:28
thebread28-Sep-06 2:28 
GeneralRe: loading COM object from aspx Pin
minhpc_bk28-Sep-06 20:33
minhpc_bk28-Sep-06 20:33 
QuestionASP.NET and ASP permissions Pin
eggie527-Sep-06 11:23
eggie527-Sep-06 11:23 
AnswerRe: ASP.NET and ASP permissions Pin
minhpc_bk27-Sep-06 15:17
minhpc_bk27-Sep-06 15:17 
QuestionGridView issue........Anyone...........please? Pin
sanju027627-Sep-06 11:03
sanju027627-Sep-06 11:03 
Here is the code from ASP.NET 1.1 that works. My problem is below with 2.0 GridView?

private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
int playerID = Convert.ToInt32(e.Item.Cells[1].Text);

string sqlDelete = "delete Players where PlayerID = '" + playerID +"'";

SqlConnection conn = new SqlConnection(dsn);
SqlCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = sqlDelete;

conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
DataGrid1.EditItemIndex = -1;
BindGrid();
}

This above code is ASP.NET 1.1 code for Deletion from DataGrid. It works fine. Now, I am using GridView (ASP.NET 2.0) The problem I am having is getting the playerID from GridView?

***int playerID = Convert.ToInt32(e.Item.Cells[1].Text); **
does not give any playerID but throws error? How do I get the playerID from GridView. Is the event handler Row Deleting or Row Deleted?

Please help.............



Sanjeev
AnswerRe: GridView issue........Anyone...........please? Pin
Christian Graus27-Sep-06 11:37
protectorChristian Graus27-Sep-06 11:37 
GeneralRe: GridView issue........Anyone...........please? Pin
sanju027627-Sep-06 12:58
sanju027627-Sep-06 12:58 
GeneralRe: GridView issue........Anyone...........please? Pin
Christian Graus27-Sep-06 13:08
protectorChristian Graus27-Sep-06 13:08 
Questiondevelopping portal using mspf Pin
WDI27-Sep-06 8:57
WDI27-Sep-06 8:57 
QuestionAJAX postback w/ asp.net Pin
eggie527-Sep-06 8:53
eggie527-Sep-06 8:53 
AnswerRe: AJAX postback w/ asp.net Pin
eggie527-Sep-06 9:10
eggie527-Sep-06 9:10 
QuestionRoboHelp and asp.net 2.0 - SOLVED Pin
#realJSOP27-Sep-06 8:53
professional#realJSOP27-Sep-06 8:53 
Questionexport detailsview to excell Pin
galatia27-Sep-06 8:26
galatia27-Sep-06 8:26 
AnswerRe: export detailsview to excell Pin
minhpc_bk27-Sep-06 19:49
minhpc_bk27-Sep-06 19:49 
QuestionViewing a single content page in multiple master pages Pin
Jell Ellis27-Sep-06 8:12
Jell Ellis27-Sep-06 8:12 
AnswerRe: Viewing a single content page in multiple master pages Pin
Not Active27-Sep-06 8:30
mentorNot Active27-Sep-06 8:30 
QuestionRe: Viewing a single content page in multiple master pages Pin
Jell Ellis27-Sep-06 10:59
Jell Ellis27-Sep-06 10:59 
AnswerRe: Viewing a single content page in multiple master pages Pin
Guffa27-Sep-06 19:06
Guffa27-Sep-06 19:06 
GeneralRe: Viewing a single content page in multiple master pages Pin
Jell Ellis28-Sep-06 3:38
Jell Ellis28-Sep-06 3:38 
QuestionHELP Pin
Polymorpher27-Sep-06 7:54
Polymorpher27-Sep-06 7:54 
AnswerRe: HELP Pin
Kschuler27-Sep-06 8:25
Kschuler27-Sep-06 8:25 
AnswerRe: HELP Pin
Not Active27-Sep-06 8:27
mentorNot Active27-Sep-06 8:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.