<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET Dynamic Data</title><link>http://forums.asp.net/1145.aspx</link><description>Discussions regarding the new scaffolding framework in ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3270940.aspx</link><pubDate>Thu, 02 Jul 2009 10:03:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270940</guid><dc:creator>sjnaughton</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270940.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3270940</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Zzdfc, you could do domething like this:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;protected void GridDataSource_Deleting(object sender, EntityDataSourceChangingEventArgs e)
{
    var entity = e.Entity as Employee;
    var DC = new Models.NorthwindDataContext();

    var log = new Log()
    {
         EntityID = entity.EmployeeID,
         TimeDeleted = DateTime.Now,
         DeletedBy = User.Id
    };
}&lt;/pre&gt;
&lt;p&gt;However if you wanted to just mark the employee as deleted instead of deleting them then you could USE SPROCS to replace default L2S or EF actions see:&lt;/p&gt;
&lt;p&gt;EF: &lt;a href="http://blogs.msdn.com/meek/archive/2008/03/26/ado-entity-framework-stored-procedure-customization.aspx"&gt;http://blogs.msdn.com/meek/archive/2008/03/26/ado-entity-framework-stored-procedure-customization.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;L2S: &lt;a href="http://blog.benhall.me.uk/2008/01/custom-insert-logic-with-linq-to-sql.html"&gt;http://blog.benhall.me.uk/2008/01/custom-insert-logic-with-linq-to-sql.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3270192.aspx</link><pubDate>Thu, 02 Jul 2009 03:20:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270192</guid><dc:creator>zzdfc</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270192.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3270192</wfw:commentRss><description>&lt;p&gt;Hi &lt;strong&gt;sjnaughton:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;What code do&amp;nbsp;it execute&amp;nbsp;&lt;/strong&gt;&amp;nbsp;after I click linkbutton &amp;quot;Delete&amp;quot; of grieview in list.aspx,please?&lt;/p&gt;
&lt;p&gt;I want to know deeper, thanks!&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3269257.aspx</link><pubDate>Wed, 01 Jul 2009 15:22:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3269257</guid><dc:creator>sjnaughton</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3269257.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3269257</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Zzdfc, your best bet is to handle the EntityDataSource&amp;#39;s OnDeleting event e.g:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;protected void GridDataSource_Deleting(object sender, EntityDataSourceChangingEventArgs e)
{
    var entity = e.Entity;
}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;You can get the actual entity from e.Entity and then do what ever you want before letting the EDS finish the delete.&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3269133.aspx</link><pubDate>Wed, 01 Jul 2009 14:15:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3269133</guid><dc:creator>zzdfc</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3269133.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3269133</wfw:commentRss><description>&lt;p&gt;I am&amp;nbsp;using Entity Framework.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t find&amp;nbsp;OnCommand event&amp;nbsp;of&amp;nbsp;linkbutton delete in GridView of list.aspx&amp;nbsp;.&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3268353.aspx</link><pubDate>Wed, 01 Jul 2009 08:59:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268353</guid><dc:creator>sjnaughton</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268353.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268353</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;What are you using Entity Framework&amp;nbsp;or Linq to SQL?&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3268347.aspx</link><pubDate>Wed, 01 Jul 2009 08:58:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268347</guid><dc:creator>davidfowl</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268347.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268347</wfw:commentRss><description>&lt;p&gt;You can handle the events on the Deleting/Deleted events on the datasource.&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3268044.aspx</link><pubDate>Wed, 01 Jul 2009 06:18:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268044</guid><dc:creator>zzdfc</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268044.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268044</wfw:commentRss><description>&lt;p&gt;example:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; I will write a &amp;quot;delete log&amp;quot; to table logs when I click delete linkbutton of gridview in List.aspx,how to do this?&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3267915.aspx</link><pubDate>Wed, 01 Jul 2009 04:39:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3267915</guid><dc:creator>chintanpshah</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3267915.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3267915</wfw:commentRss><description>&lt;p&gt;Can you please explain your requirement in detail?&amp;nbsp;&lt;/p&gt;</description></item><item><title>How to custom delete command in list.aspx or detail.aspx</title><link>http://forums.asp.net/thread/3267842.aspx</link><pubDate>Wed, 01 Jul 2009 03:51:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3267842</guid><dc:creator>zzdfc</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3267842.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3267842</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;How to custom delete command in list.aspx or detail.aspx?&lt;/p&gt;
&lt;p&gt;I hope delete other data and write log after deleting a recorder in list.aspx or detail.aspx&lt;/p&gt;</description></item></channel></rss>