Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid - select, delete,...
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Titre:
Grid - select, delete,...
Divers
Thread ID:
00887742
Message ID:
00887742
Vues:
75
I'm trying to use grid to edit/delete data in 3 tables on a SQL Server.
The data in the tables is related on integer keys.
To delete an item, I need to get the id of the parent from the grid, then the id of the child from the parent, then the id of grandchild from the child, and then delete the records.
I added a Select button in the first column, and when it is pushed I get the id of the parent from
public void grdMembers_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
  string memberId = e.Item.Cells[1].Text;
I can see I get the right value, but, of course I can't use it, because it is a string, and I need an integer.

The next problem is that for editing I'd like to go to another page, and I tried, in the same method:
Response.Redirect("EditAccount.aspx?idToEdit=" + Convert.ToInt16(Label1.Text.ToString());
It doesn't take me to that page.

Of course I did some google and search on UT, but I get either too much or nothing... Am I on the right track?
Doru
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform