代码之家  ›  专栏  ›  技术社区  ›  Arnkrishn

ASP.NET:正在反序列化服务器端对象

  •  0
  • Arnkrishn  · 技术社区  · 15 年前

    我是新手ASP.NET,AJAX,JSON,jQuery和am正在尝试解决以下问题:

    到目前为止我做了什么?

    1. 使用JavaScriptSerializer序列化arraylist。

    1. 我知道我需要反序列化服务器端对象。但是如何使用jQuery访问它呢?
    2. 我采取正确的方法来解决这个问题吗?

    请原谅我的问题和方法太天真了。一定要给我指点迷津。

    干杯

    2 回复  |  直到 15 年前
        1
  •  0
  •   John Saunders    15 年前

    你一定要这样做吗?为什么不使用 RadioButtonList ?

        2
  •  0
  •   solairaja    15 年前

    <form id="form1" runat="server">
        <div>
            <asp:RadioButtonList ID="RadioButtonList1" runat="server" DataSourceID="SqlDataSource1"
                DataTextField="year" DataValueField="year">
            </asp:RadioButtonList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:tempdbConnectionString %>"
                SelectCommand="Select 2009 as year&#13;&#10;union all&#13;&#10;select 2008 as year&#13;&#10;union all&#13;&#10;select 2007 as year&#13;&#10;union all&#13;&#10;select 2006 as year&#13;&#10;union all&#13;&#10;select 2005 as year">
            </asp:SqlDataSource>
        </div>
    </form>