Dynamically created textboxes and changes plus jQuery in ASP.NET?
<p>I was wondering how to read off a value from a textbox that resides in a partialview and output the value into a textbox within the initial window.</p>

<p>Here's my code...</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function (e) {

    // Calculate the sum when the document has been loaded.
    var total = 0;
    $("#fieldValues :input.fieldKronor").each(function (e) {
        total += Number($(this).val());
    });

    // Set the value to the correspondent textbox
    $("#fieldSummation").text(total);

    // Re-calculate on change
    $("#fieldValues :input.fieldKronor").change(function (e) {
        var total = 0;
        $("#fieldValues :input.fieldKronor").each(function (e) {
            total += Number($(this).val());
        });

        $("#fieldSummation").text(total);

    });
}); &lt;/script&gt;
</code></pre>

<p>Here's the table where in info is...</p>

<pre><code>&lt;table id="fieldValues" style="width: 60%; margin-bottom: 2em"&gt;
            &lt;thead&gt;
                &lt;tr&gt;
                    &lt;th&gt;Rubrik, t.ex. teknik*&lt;/th&gt;
                    &lt;th&gt;Kronor (ange endast siffror)*&lt;/th&gt;
                &lt;/tr&gt;
            &lt;/thead&gt;

            &lt;asp:Panel ID="pnlStaffRows" runat="server"&gt;&lt;/asp:Panel&gt;

            &lt;tfoot&gt;
                &lt;tr&gt;
                    &lt;th&gt;&lt;/th&gt;
                    &lt;th&gt;Total kostnad&lt;/th&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;input type="text" value="" class="fieldSummation" style="width:120px" /&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/tfoot&gt;
        &lt;/table&gt;
</code></pre>

<p>And here's the partialview...</p>

<pre><code>&lt;tr&gt;
    &lt;td class="greyboxchildsocialsecuritynumberheading4" style="padding-bottom:1em"&gt;
        &lt;asp:TextBox ID="txtRubrikBox" ToolTip="Rubrik" runat="server" Width="120"&gt;&lt;/asp:TextBox&gt;
    &lt;/td&gt;
    &lt;td class="greyboxchildnameheading3" style="padding-bottom:1em"&gt;
        &lt;asp:TextBox ID="txtKronorBox" class="fieldKronor" ToolTip="Kronor" runat="server" Width="120"&gt;&lt;/asp:TextBox&gt;
    &lt;/td&gt;               
&lt;/tr&gt;
</code></pre>
