Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8182607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:54:42+00:00 2026-06-07T00:54:42+00:00

I’m working on a ASP.NET Dynamic Data web site with a Linq to SQL

  • 0

I’m working on a ASP.NET Dynamic Data web site with a Linq to SQL Database Context and I have a question. In one of my tables, ARReports, exists a column with raw XML data which I can deserialize into a ReportDetails object, along with other data such as EditedBy, ReleaseDate, and other fields.

ReportDetails has several public properties which I would like to expose on my custom Edit.aspx page.

My goal is: when a user navigates to the Edit.aspx page, I want them to be able to edit the ARReports row and the public properties of ReportDetails, all of which are primative types. Then when they update: serialize the ReportDetails object back into XML and update that field in the table.

Is there anyway I can say, create a Property in the ARReport class (the Linq to SQL class) of type ReportDetails, and have that class scaffold into the Edit.aspx page? Maybe something that looks like this:

public partial class ARReport
{
    private ReportDetails _details;

    public ReportDetails Details
    {
         get
         {
             if (_details == null)
                  _details = ReportDetails.DeSerialize(this.RawXML);
             return _details;
         }
         set
         {
             this.RawXML = ReportDetails.Serialize(_details);
         }
}

public class ReportDetails
{
     public String Owner {get; set;}
     public DateTime LastEdit {get; set;}
     //...etc...

     public static String Serialize(ReportDetails report)
     {
          // serialization code
     }

     public static ReportDetails DeSerialize(String rawXML)
     {
         // deserialization code
     }
}

I am hoping there is some combination of Attributes and/or tricks I can apply to the classes and properties to achieve what I am looking for but so far, a rigorous google search has not presented any solutions. I hope this wasn’t too confusing. I appreciate any help or insight.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:54:43+00:00Added an answer on June 7, 2026 at 12:54 am

    This can be done. Consider keeping the properties of the ReportDetails OUT of the L2S data context (since it is not explicitly in your DB except as one column).

    What I would suggest is building a custom field template for the Report Details. Use UIHintAttribute to reference that field template properly on the Edit/Details pages. Before populating the control, deserialize the report details into a POCO and fill in the control as per usual..

    As far as serialization, in the datacontext override the SubmitChanges event, check for Updates to the ARReport, change the property value, and then submit changes:

    public override void SubmitChanges(System.Data.Linq.ConflictMode failureMode)
    {
        ChangeSet changeset = GetChangeSet();
        foreach (var change in changeset.Updates.OfType<ARReport>())
        {
            // serialize ReportDetails here before submitting changes. 
        }   
        try
        {
            base.SubmitChanges(ConflictMode.ContinueOnConflict);
        }
        catch (ChangeConflictException cce)
        {
            // handle this
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a reasonable size flat file database of text documents mostly saved in
I have some data like this: 1 2 3 4 5 9 2 6
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.