|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
FormView ItemUpdated: NewValues array not getting values on updateI'm working on an ASP.Net web app using VS2005 and the .Net 2.0 framework,
and I have a serious problem with the page I'm currently working on. The page has, among other things, two FormViews and a GridView control, each with its own SqlDataSource. FormView1 talks to my Opportunity table and has an ItemTemplate and an EditItemTemplate. FormView2 talks to my Activities table and has an ItemTemplate, InsertItemTemplate and an EditItemTemplate. The GridView only reads data from the Activities table and does not appear to affect this problem. All of the controls read from the tables with no problem and switch modes with no problem, but when going into Update mode, changing something and clicking the Update button, it does not save the information to the tables. As far as I can tell, the problem is that the program is not passing updated information to the NewValues array that you can access from the ItemUpdating event args. This is driving me nuts. The code and markup looks fine to me, in fact I have a page with similar information on it that works fine. Any ideas? Hi MGlass,
Welcome to ASPNET newsgroup. Regarding on the FormView updating problem, I think it is likely a page specific issue. From you description, you've checked the FormView's ItemUpdating event and found that the FormView EventArgs dosn't contains the updated values in the new values colleciton ,yes? If so, I think the problem may caused by something incorrect in the FormView's aspx template. Would you try comparing the problem page with the other page which works correctly to see whether there is any diference? Also, you can test through a sample database table like the Categories table in northwind db to see whether you'll encounter the same problem. If there're anything else unclear, please feel free to post here. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- Show quoteHide quote | Thread-Topic: FormView ItemUpdated: NewValues array not getting values on microsoft.public.dotnet.framework.aspnet:135347update | thread-index: AcXfJ0CS2RssI9hSQ/erwA1i4omFxA== | X-WBNR-Posting-Host: 66.166.163.242 | From: "=?Utf-8?B?TWljaGFlbCBHbGFzcw==?=" <MGlass@newsgroups.nospam> | Subject: FormView ItemUpdated: NewValues array not getting values on update | Date: Tue, 1 Nov 2005 13:00:13 -0800 | Lines: 15 | Message-ID: <2FEC8F77-F228-409B-8835-87582AEDE***@microsoft.com> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | I'm working on an ASP.Net web app using VS2005 and the .Net 2.0 framework, | and I have a serious problem with the page I'm currently working on. The page | has, among other things, two FormViews and a GridView control, each with its | own SqlDataSource. FormView1 talks to my Opportunity table and has an | ItemTemplate and an EditItemTemplate. FormView2 talks to my Activities table | and has an ItemTemplate, InsertItemTemplate and an EditItemTemplate. The | GridView only reads data from the Activities table and does not appear to | affect this problem. All of the controls read from the tables with no problem | and switch modes with no problem, but when going into Update mode, changing | something and clicking the Update button, it does not save the information to | the tables. As far as I can tell, the problem is that the program is not | passing updated information to the NewValues array that you can access from | the ItemUpdating event args. This is driving me nuts. The code and markup | looks fine to me, in fact I have a page with similar information on it that | works fine. Any ideas? | Hi Steven. I would also think that the problem is page-specific, however I
can't see any real difference in the page that works and the page that doesn't, except for the fact that the page that works only has one formview and that's it. That FormView is nearly identical to one on the page that doesn't work; in fact, I copied and pasted the markup to keep the formatting correct. I've been over the page a bunch of times and I can't see anything wrong jumping out at me. If there is an error there, it's very subtle. I will try to refactor to access from the Northwind database, and I'm going to attempt to rebuild the page as well. Thanks. Show quoteHide quote "Steven Cheng[MSFT]" wrote: > Regarding on the FormView updating problem, I think it is likely a page > specific issue. From you description, you've checked the FormView's > ItemUpdating event and found that the FormView EventArgs dosn't contains > the updated values in the new values colleciton ,yes? If so, I think the > problem may caused by something incorrect in the FormView's aspx template. > Would you try comparing the problem page with the other page which works > correctly to see whether there is any diference? Hi MGlass,
Thanks for your response. Well, if you got any further progress or need any further assistance, please feel free to inform me. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | Thread-Topic: FormView ItemUpdated: NewValues array not getting values on <b3FxxJ33FHA.2***@TK2MSFTNGXA01.phx.gbl>up | thread-index: AcXfvkCF0pgqNHo8RAOX3sQw+zfUIw== | X-WBNR-Posting-Host: 66.166.163.242 | From: "=?Utf-8?B?TWljaGFlbCBHbGFzcw==?=" <MGlass@newsgroups.nospam> | References: <2FEC8F77-F228-409B-8835-87582AEDE***@microsoft.com> Show quoteHide quote | Subject: RE: FormView ItemUpdated: NewValues array not getting values on microsoft.public.dotnet.framework.aspnet:135506up | Date: Wed, 2 Nov 2005 07:01:06 -0800 | Lines: 19 | Message-ID: <1A6EC43A-41D2-4FC8-9596-9A1BA1B01***@microsoft.com> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Hi Steven. I would also think that the problem is page-specific, however I | can't see any real difference in the page that works and the page that | doesn't, except for the fact that the page that works only has one formview | and that's it. That FormView is nearly identical to one on the page that | doesn't work; in fact, I copied and pasted the markup to keep the formatting | correct. I've been over the page a bunch of times and I can't see anything | wrong jumping out at me. If there is an error there, it's very subtle. | | I will try to refactor to access from the Northwind database, and I'm going | to attempt to rebuild the page as well. Thanks. | | "Steven Cheng[MSFT]" wrote: | > Regarding on the FormView updating problem, I think it is likely a page | > specific issue. From you description, you've checked the FormView's | > ItemUpdating event and found that the FormView EventArgs dosn't contains | > the updated values in the new values colleciton ,yes? If so, I think the | > problem may caused by something incorrect in the FormView's aspx template. | > Would you try comparing the problem page with the other page which works | > correctly to see whether there is any diference? |
Other interesting topics
Threads sharing objects in memory during high volume use
tell if site is a debug build? How can I stop ASPX file rendering in Page_Load event? Why is it that 100% width looks like 95%? Making an Excel File server.transfer unselectable datacombo Code reuse, code behind, and can't inherit since already inherits Page Finding a control strange string added to all project's URLs when running on localhost |
|||||||||||||||||||||||