473,511 Members | 15,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FormView ItemUpdated: NewValues array not getting values on update

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?
Nov 19 '05 #1
3 3858
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.)


--------------------
| Thread-Topic: FormView ItemUpdated: NewValues array not getting values on
update
| thread-index: AcXfJ0CS2RssI9hSQ/erwA1i4omFxA==
| X-WBNR-Posting-Host: 66.166.163.242
| From: "=?Utf-8?B?TWljaGFlbCBHbGFzcw==?=" <MG****@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: <2F**********************************@microsoft.co m>
| 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
microsoft.public.dotnet.framework.aspnet:135347
| 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?
|

Nov 19 '05 #2
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?

Nov 19 '05 #3
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
up
| thread-index: AcXfvkCF0pgqNHo8RAOX3sQw+zfUIw==
| X-WBNR-Posting-Host: 66.166.163.242
| From: "=?Utf-8?B?TWljaGFlbCBHbGFzcw==?=" <MG****@newsgroups.nospam>
| References: <2F**********************************@microsoft.co m>
<b3**************@TK2MSFTNGXA01.phx.gbl>
| Subject: RE: FormView ItemUpdated: NewValues array not getting values on
up
| Date: Wed, 2 Nov 2005 07:01:06 -0800
| Lines: 19
| Message-ID: <1A**********************************@microsoft.co m>
| 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
microsoft.public.dotnet.framework.aspnet:135506
| 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?
|

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
6154
by: Ottar | last post by:
I have a few numeric fields, and when I update i get the error: "Input string was not in a correct format". Next line:" System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&...
1
3727
by: Scott R | last post by:
I want to be able to see the changes a user makes while in the Edit Mode of FormView. My understanding is that in the FormView ItemUpdating event, I should be able to get a collection of Keys,...
0
2180
by: Metal2You | last post by:
I'm working on an ASP.NET 2.0 application in Visual Studio 2005 that accesses a Sybase database back end. We're using Sybase SQL Anywhere 9.0.2.3228. I have installed and registered the Sybase...
0
1566
by: Wayne Wengert | last post by:
I have a problem trying to do an Update using a formview. The datasource is an SQLDatasource connected to a SQL Server database. If I saelect an entry to edit, all of the correct values for the row...
1
2755
by: cisco | last post by:
I've been trying to figure out how the client of a DetailsView or FormView should handle the ItemUpdating event when setting the datasource programatically. I want to do something simple like...
4
3430
by: Ned Balzer | last post by:
Can anyone explain why in the following code, where btnCancel1 is a Button inside the itemTemplate of the formview, the first call to change the text of the button, in the Page_Load sub, works...
4
4660
by: J055 | last post by:
Hi I have 2 update buttons in my FormView ('Apply' and 'OK'). I want both buttons to update the data source but the 'OK' button should redirect afterwards. I can see which button is clicked...
2
4480
by: sck10 | last post by:
Hello, I have a web page that has a GridView and a FormView, each in its own panel. The GridView shows a list of records in a database. When a row in the GridView is selected the FormView...
0
1302
by: Michel Couche | last post by:
Hello, I am using a combination of a GridView and a FormView to allow editing of a large table. The GridView displays the main fields and a "Select" button opens a FormView in the edit mode...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7089
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5072
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.