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

  • SEARCH
  • Home
  • 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 6348459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:25:23+00:00 2026-05-24T21:25:23+00:00

As now I have started to use Script#, I tried to send a data

  • 0

As now I have started to use Script#, I tried to send a data package to server via ajax:

jQuery.AjaxRequest<RespondPackage>(url, new jQueryAjaxOptions("type", "POST", "dataType", "json", "data",  dataSendToServer));

with dataSendToServer is in form of object Type “SendPackage” using get and set accessor, like this:

public class SendPackage
{  private string reportID;
    public string ReportID
    {
        get { return reportID; }
        set { reportID = value; }
    }
    public SendPackage(string reportID)
    {
        this.reportID = reportID;
    }
}

While sending the data to server using ajax after transform to Javascript, it send not only the reportID (the data needed) , but also get_reportID and set_reportID.

I have tried several method to remove the dummy properties of the get and set accessor like Type.DeleteField but it seems doesn’t work. Therefore I want to ask if there is any method to treat the data sending to server to remove the property of get and set accessor?

Thanks for your attention.

  • 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-05-24T21:25:23+00:00Added an answer on May 24, 2026 at 9:25 pm

    Use a record class, i.e. derive your class from the Record base class.

    Record classes don’t get defined as a regular class – instead only a factory method representing your ctor is created. The result of the factory is a vanilla object which serializes into a JSON object as you’d expect.

    Record classes cannot have methods or properties – just public properties and at most a ctor.

    Note that you could also have any class implement a ToJSON method – that gets to override what gets serialized when using the JSON functionality built into the script engine (and presumably jQuery also uses it).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started to try out noSQL databases now and are currently testing out
I am new to NHibernate and have just started right now. I have very
I've been a web developer for some time now, and have recently started learning
The javascript code I now have can toggle a single row of data. Whether
With help from you guys I now have a script that works like a
I have a script that links to the server I am hosting (IP can
I have a shell script I use for deployments. Since I want to capture
I have tested symfony and started with 2.0 now the new 2.0.1 version it
Hello everybody and thanks for interest some time ago i have started to use
I now have it set up so that when people go to a thank

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.