Linq to SQL, Ajax postbacks, and page state in ASP.NET -


This should often be the question, but not yet, so it seems I'm using SQL from a Linux application For that which allows many types of data changes in my in-memory model, and then the changes will be put in line for an asynchonous processing. Therefore, I'm not worried about the update (yet) the variety of data Modal Pop on Web Page Changes in Parts As can be through. Some are grid-based, others have only properties. I am running into problems with changes that prevent postback cycle, obviously, I continue to do anything for the database until all the changes are made and the user does not want to present the page.

The route that I have chosen so far.

  • I am loading disability deferred
  • I create a [serializable] partial square for my root object
  • I put things in session And retrieved it in the onload status

It works in principle. However, when I try to update some of the properties of children after retrieving the object from the session,

  p.PhysicianSpecialties [0] .physician_specialty_code = ddlSpecialty.SelectedItem.Value;  

I get this error:

  The operation is not valid due to the current state of the object.  

This method occurs in the generic Linux setter method due to the call:

  this.SendPropertyChanging ();  

Other properties fine update:

  p.PhisicianNames [0] .first_name = txtFirstName.Text.ToUpper ();  

This is not the cause of an error.

My question: Am I basically on the wrong track? Is there a better way of doing this? What causes the error?

Update: I think the exception is 'System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException' but I do not know the solution yet.

I got the solution from MSDN issue, and compared to that I can explain this better It is, that one union can not change one-sided, but to do this at both ends, not just by changing ID by telling a new child object:

p.PhysicianSpecialties [0]. PhysicianSpecialtyLookup = db.PhysicianSpecialtyLookups.Single (c => (c.physician_specialty_code == ddlSpecialty.SelectedItem.Value));


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -