jQuery Replace label with ASP.NET dropdownlist
<p>I am building an editable form using data from my database which requires the use of an ASP.NET control.  I got this working in HTML, but when I added the .NET part, I got stuck.</p>

<p>Here's the situation: I have a label displayed on the page with an edit button below it.  What's supposed to happen is that once the edit button is pressed, the label becomes a .NET dropdown list with data from the database.  Once the user clicks save, the dropdown list will go back into a label displaying the selected value.</p>

<p>My problem is that when you click the edit button, the dropdown list never appears.</p>

<p>Here's the code:</p>

<p><strong>.ASCX</strong></p>

<pre><code>&lt;li&gt;
    Campus
    &lt;br /&gt;
    &lt;span class="datainfoDropdown"&gt;
        &lt;strong&gt;
            &lt;asp:Literal ID="CampusAttended" runat="server" ClientIDMode="Static"/&gt;
        &lt;/strong&gt;
        &lt;asp:DropDownList ID="ProfileCampusDropDown" runat="server" ClientIDMode="Static" style="display:none;" &gt;&lt;/asp:DropDownList&gt;
    &lt;/span&gt;
    &lt;a href="#" class="editlinkDropdown"&gt;Edit Info&lt;/a&gt;
    &lt;a class="savebtnDropdown"&gt;Save&lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p><strong>Javascript</strong></p>

<pre><code>$(".editlinkDropdown").on("click", function (e) {
    e.preventDefault();
    var datasets = $(this).prevAll(".datainfoDropdown");
    var savebtn = $(this).next(".savebtnDropdown");
    datasets.each(function () {
        var theid = $(this).attr("id");
        var currval = $(this).text();
        var dropDown = $('#ProfileCampusDropDown').html();
        $('.datainfoDropdown').html(dropDown);
    });

    $(this).css("display", "none");
    savebtn.css("display", "block");
});

$(".savebtnDropdown").on("click", function (e) {
    e.preventDefault();
    var elink = $(this).prev(".editlinkDropdown");
    var datasets = $(this).prevAll(".datainfoDropdown");
    datasets.each(function () {
        var newid = $(this).attr("id");
        var einput = $("#" + newid + "-form");
        var newval = $('#ProfileCampusDropDown :selected').text();
        //einput.remove();
        $(this).html('&lt;strong&gt;' + newval + '&lt;/strong&gt;');
    });

    $(this).css("display", "none");
    elink.css("display", "block");
});
</code></pre>

<p>How do I get my edit button to display the dropdown list?</p>
