Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Refreshing' SQLDataSource with new data
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01346714
Message ID:
01346811
Vues:
17
>Now we put code in RowDeleting (my colleague's attempts) and the RowDeleted event is never fired as well as this code doesn't seem to do the job. Can you help a bit here?

I don't think RowDeleted fires when you're manually using your own dataset instead of the SqlDataSource.

Calling Delete on the row just flags it for deletion. You have to call AcceptChanges() on the DataTable. Also, I wouldn't call Session.Clear() - you can just update the session var via: Session["dts"] = dts;

Session.Clear() blows away any other session variables which is usually a bad idea.

You may also really want to look into using parameters for your SQL update clause - viewstate can be hacked.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform