Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using viewstate Accepts data changes :<

Reply
Thread Tools

Using viewstate Accepts data changes :<

 
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      08-20-2003
Hi,

I have a typed dataset, that is serialized using viewstate.
Now when a user adds a new row from a certain grid, the new row is added to
the typed dataset. The database TRANSACTION however, is done only when the
user clicks 'save record'

And indeed, the newly added rows (as well as the form data) are retrieved
and updated EXCEPT the rows from the grid.
The seem to be accepted (internally by the ViewState???)

Code (shortened and conceptualized)

void grid_onaddrow()
{
xsd.Blah.tUserGroupsRow row =
this.myDs.tUserGroups.newUserGroupsRow();
row.field = "blah";
row.field2 = DateTime.now;
this.myDs.tUserGroups.addNewUserGroupsRow(row)

/// THIS SEEMS TO ACCEPT CHANGS
ViewState["mydata"] = this.myDs; //store in ViewState
}


void button_Save()
{
// fetch screen data...
mySqlAdapter.sqlUser.Update(this.myDs.Users); // Works
mySqlAdapter.sqlUserGroups.Update(this.myDs.UserGr oups); // NO EFFECT
// it has NO effect because the added/changed rows seem to be accepted at
the marked line above!
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gtkdialg accepts XML data that is not well-formed =?ISO-8859-1?Q?J=FCrgen_Kahrs?= XML 3 12-21-2006 10:10 PM
is there a way thru which i can make changes in the security option so that browser accepts activex? zEE ASP .Net 1 07-31-2006 02:53 PM
is there a way thru which i can make changes in the security option so that browser accepts activex? zEE ASP .Net 1 07-31-2006 02:40 PM
is there a way thru which i can make changes in the security option so that browser accepts activex? zEE ASP .Net 0 07-31-2006 01:25 PM
Using regexp to check for length of string that accepts optionalstrings - Java 8 07-31-2005 11:38 PM



Advertisments