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 8029359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:24:51+00:00 2026-06-05T00:24:51+00:00

I have used the ASP.NET Hidden field control, allowing me to generate single-item data

  • 0

I have used the ASP.NET Hidden field control, allowing me to generate single-item data values in javascript and then send the values back to the server on postback.

My new problem is that I have an entire list of items that are created and edited entirely in the browser client. The control itself is not an ASP.NET control. (I’m using the kendo list view).

How do I send this data back?

I’m assuming that the javascript will need to encode the local datasource into the DOM somehow, and the server code will extract the values somehow.

The only “somehow” I can think of is to serialize all of the values into a single string and set that as a hidden field value.

Serializing the values using javascript and deserializing these using C# is certainly dooable, but seems a bit too “manual”. I’m wondering if there is a more straightforward way which doesn’t involve manual serialization. Some way to write to the DOM which is then picked up by the ASP.NET binding functionality.

For this problem, the data is in the following format:

[
   {
      sequenceNumber : 1,
      mediaFileId: 3
    },
    {
       sequenceNumber : 2,
       mediaFileId: 28
    },
    {
       sequenceNumber : 3,
       mediaFileId:  32
    }
]

You could argue that the sequenceNumber is redundant, but I will be adding new fields in the future, so it would be best to arrive at a solution which caters for multi-field data objects.


I know I could replace the entire post with an AJAX call, but at this point that would be too big a change to the existing page.

  • 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-05T00:24:54+00:00Added an answer on June 5, 2026 at 12:24 am

    Some way to write to the DOM which is then picked up by the ASP.NET binding functionality.

    Not sure what you mean there – without an ASP.NET server control, there’s nothing that will pick up the value on the postback. The server controls use the hidden field for ViewState to store this data, but it’s not really feasible to add or update items from the client.

    Since you already have your data in JSON, I would just put it into a HiddenFieldValue and use a JSON deserializer on the C# side to get it back to a POCO.

    JavaScriptSerializer, DataContractJsonSerializer, or JSON.NET should all work for the C# deserialization routine without much manual work.

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

Sidebar

Related Questions

I have used Visual Studio 2008 ASP.NET AccessDataSource Wizard to generate the update command.
We are developing a SaaS application in Asp.net, where we have used the Single
We have a ASP.net MVC 3 website.We had to store many values in hidden
I have used $.ajax function to fetch data from C# in asp.net MVC3.0, Now
I have a field on an asp.net page for which I have used RequiredFieldValidator
I have used Ajax Calendar extender control (from here ) in my asp.net 3.5
I have a couple of hidden inputs on an asp.net mvc view. Their values
I have been reading about MVP, MVVM and have used asp.net MVC in couple
I have not used ASP.NET Membership and Role Providers before but looking for a
I have used JQuery within my asp.net page. JQuery is working fine. I could

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.