ユーザーが入力した後にデータベースに保存するためにコードビハインドに渡す必要があるアドレス情報を収集する単純なモーダル jQuery ダイアログポップアップがあります。私は何百もの例を検索しましたが、以下の時点で最新ですが、何をしても、作成された JSON 文字列は、渡そうとするすべてのフィールドに対して「未定義」と表示されます。私の結論は、jQuery で JSON 文字列を作成するために使用している方法は間違っているということですが、これを行うためにさまざまな方法を試した後、どれも機能しません。IDでフィールドにアクセスしようとしましたが、クラスと、以下に示すように、さまざまな方法を使用してIDでアクセスしました。コードのスニペットを次に示します。誰が私がどこで間違っているかを見ることができますか?
<script type="text/javascript">
    $(function () {
        $('#dialog').dialog({
            draggable: true,
            resizeable: false,
            autoOpen: false,
            height: 700,
            width: 550,
            modal: true,
            top: 0,
            left: 0,
            title: 'Edit Information',
            buttons: {
                'Save': function () {                        
                    $('#ibSaveInfo').click();
                },
                'Cancel': function () {
                    $(this).dialog('close');
                }
            }
        }).parent().css('z-index', '1005');
    });
    $(document).on("click", "#ibSaveInfo", function () {
        var inputArray = new Array;
        var idx = 0;
        inputArray[idx] = 'Address1:' + $("#dialog").find("#txtAddress1").val();
        idx++;
        inputArray[idx] = 'Address2:' + $("#txtAddress2").val();
        idx++;
        inputArray[idx] = 'city:' + $("txtcity").val();
        etc, etc
        var inputArrayList = "{ inputArray: " + JSON.stringify(inputArray) + "}";
        $.ajax({
            type: "POST",
            dataType: "json",
            contentType: "application/json",
            url: "Address.aspx/SaveInfo",
            data: inputArrayList,
            success: function (data) {
                //debugger;
                if (data.d.indexOf("Error") != -1) {
                }
                else {
                    $("#ResultLabel").show();
                    $("#ResultLabel").text("Sum of all the contents is: " + data.d);
                }
            },
            error: function (e, ts, et) {
                //debugger;
                alert(ts);
            }
        }); //ajax func end
    });
    $(document).ready(function () {
        $("#ibEdit").click(function (e) {
            $('#dialog').dialog('option', 'position', [e.pageX + 10, e.pageY + 10]);
            $('#dialog').dialog('open');
        });
    });
<div id="dialog" style="padding-left: 10px; padding-bottom: 15px;">
    <asp:TextBox runat="server" ID="txtAddress1" ClientIDMode="Static" />
    <asp:TextBox runat="server" ID="txtAddress2" ClientIDMode="Static" />
    <asp:TextBox runat="server" ID="txtCity" ClientIDMode="Static" />
    etc, etc
</div>