<?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: Wrong value on update</title><link>http://forums.asp.net/thread/3268883.aspx</link><pubDate>Wed, 01 Jul 2009 12:36:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268883</guid><dc:creator>sjnaughton</dc:creator><author>sjnaughton</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268883.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268883</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;If it&amp;#39;s a ForiegnKey field I would check the ExtractValue method of the ForeignKey_Edit.aspx.cs and see what value it has when you put a break point in there.&lt;/p&gt;
&lt;p&gt;You can a a break point with a condition i.e. Column.Name == &amp;quot;MyColumn&amp;quot; and then it will only breal on that column if you have several in that table.&lt;/p&gt;</description></item><item><title>Re: Wrong value on update</title><link>http://forums.asp.net/thread/3268745.aspx</link><pubDate>Wed, 01 Jul 2009 11:38:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268745</guid><dc:creator>stevew1975</dc:creator><author>stevew1975</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268745.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268745</wfw:commentRss><description>&lt;p&gt;What happens when you do an update or anything that posts back, is that the page_load is run before your update code.&lt;/p&gt;&lt;p&gt;I was just checking to see if there is anything in your page_load which is updating the information before hitting your update code.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Wrong value on update</title><link>http://forums.asp.net/thread/3268667.aspx</link><pubDate>Wed, 01 Jul 2009 11:00:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268667</guid><dc:creator>michaelr524</dc:creator><author>michaelr524</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268667.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268667</wfw:commentRss><description>&lt;p&gt;Hey Steve,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Can you explain please, I didn&amp;#39;t really understand your answer.&lt;/p&gt;&lt;p&gt;The original value is loaded automaticly then I edit a row and then I update and get this:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The UPDATE statement conflicted with the FOREIGN KEY constraint &amp;quot;FK_Readiness_ActivitiesHistory_Readiness_ActivitiyStatusFactorDef&amp;quot;. The conflict occurred in database &amp;quot;ReportsEden&amp;quot;, table &amp;quot;dbo.Readiness_ActivitiyStatusFactorDef&amp;quot;.&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;The statement has been terminated.&lt;/div&gt;&lt;p&gt;&lt;p&gt;Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The UPDATE statement conflicted with the FOREIGN KEY constraint&amp;nbsp;&lt;/p&gt;&lt;/p&gt;&lt;p&gt;I inspected the values sent from the page using FireBug and then I inspected the values before they are being sent to the database and they are not the same.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;Michael&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>Re: Wrong value on update</title><link>http://forums.asp.net/thread/3268589.aspx</link><pubDate>Wed, 01 Jul 2009 10:33:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268589</guid><dc:creator>stevew1975</dc:creator><author>stevew1975</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268589.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268589</wfw:commentRss><description>&lt;p&gt;Check you page load, are you updating it with the original value here.&amp;nbsp; If so you may need the !IsPostback check.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Wrong value on update</title><link>http://forums.asp.net/thread/3268470.aspx</link><pubDate>Wed, 01 Jul 2009 09:53:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268470</guid><dc:creator>michaelr524</dc:creator><author>michaelr524</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268470.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3268470</wfw:commentRss><description>&lt;p&gt;Hey people,&lt;/p&gt;&lt;p&gt;Here is a strange problem. I&amp;#39;ve created a DD Linq2Sql website.&lt;/p&gt;&lt;p&gt;When editing and then updating a row one of the foreign fields is wrong on update&lt;/p&gt;&lt;p&gt;and causes an error in SQL. I don&amp;#39;t understand where does it take it&amp;#39;s value from.&lt;/p&gt;&lt;p&gt;The value which is sent through AJAX from the select box is right, but when I put a break point in the update method I could see the value is wrong there.&lt;/p&gt;&lt;p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;partial void UpdateReadiness_ActivitiesHistory(Readiness_ActivitiesHistory instance)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt;	&lt;/span&gt;// here I set the breakpoint and inspected &amp;#39;&lt;b&gt;instance&lt;/b&gt;&amp;#39;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;ExecuteDynamicUpdate(instance);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Has anyone had any experience of this kind?&lt;/div&gt;&lt;div&gt;Please help.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks&lt;/div&gt;&lt;div&gt;Michael&lt;/div&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;partial void UpdateReadiness_ActivitiesHistory(Readiness_ActivitiesHistory instance)&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ExecuteDynamicUpdate(instance);&lt;/div&gt;
&lt;div style="position:absolute;left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;" id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item></channel></rss>