ASP.NET is rendering the control inside your string definition.
The output of that <asp:DropDownList>
contains newlines, double quotes, and references to javascript functions, so it will definitely make a mess of your javascript string.
Instead, let asp.net render the dropdown somewhere else (it can even be inside an invisible div) like this :
<div id="hiddenthingContainer" style="display:none;">
<asp:dropdownlist /> ... etc
</div>
Then, either use document.getElementById("hiddenthingContainer")
or use jQuery or whatever dom library you prefer to get the element.
once you have it, it becomes a simple matter of getting the contents of the hidden container and presto, there's your string.
example using jQuery :
<div id="hiddenthingContainer" style="display:none">
<asp:DropDownList ID='drpid' runat='server' DataSourceID='SqlDataSource1' DataValueField='Id' DataTextField='Text'></asp:DropDownList>
</div>
<script type="text/javascript">
$(document).ready(function(){
var dropdown = $("#hiddenthingContainer").html()
});
</script>