locked
How to Improve the transmit rate when store json string in hiddenfield RRS feed

  • Question

  • User-86041214 posted

    Hi:

    I meet a big problem about the usage of json. Basically, I hope json can replace ViewState, so, I put the 

    DB search results in hiddenfield via using JsonConvert.SerializeObject(DataList), and the basic format of code 

    snippet is following:

    Html:
    <asp:HiddenField ID="hidRecordList" runat="server" EnableViewState="false" />
    C#:
    JsonConvert.SerializeObject(DataList); JsonConvert.DeserializeObject<List<MyStructure>>(JsonString);

    It can run well, but very slow, and I found the main problem is the transmit speed. Big Data store in hiddenfield will cause the page load 

    slow down quickly. Is there any way to improve, or there is some other method to store json in other places. Thanks a lot. 

    Wednesday, March 21, 2018 3:35 AM

Answers

  • User-474980206 posted
    Store in a data store on the server side, and only place a key in the hidden field.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 21, 2018 2:04 PM