I am having a div. I am passing a HTML string to that div using INNERHTML in JSON. The div is not coming in the output.
Here is my code
$('#<%=btnSubmitData.ClientID %>').live('click', function () {
var jsonParameters = '{"startProductLevelId":"' + prdLvlId1 + '"}';
$.ajax({
type: "POST",
url: "../Test/Test.aspx/PopulateData",
context: this,
cache: false,
data: jsonParameters,
contentType: 'application/json',
dataType: "json",
"success": function (LastweeksData) {
$("#brandData").css("display", "block");
alert(LastweeksData.d); //Here i am getting the value
document.getElementById('<%=brandData.ClientID%>').innerHTML = LastweeksData.d;
},
"error": function (request, status, error) {
alert(error);
}
})
});
My div - "brandData"
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<div id="dummy1" style="width: 100%; height: 20px; float: left">
</div>
<div id="Div2" style="width: 100%; height: 20px; float: right; border-style: solid; border-width: 0px;">
<table id="Table1" align="center" cellspacing="0" border="0" cellpadding="0" width="950">
<tr>
<td width="500" align="left" valign="top">
<div id="brandData" runat="server">
</div>
</td>
</tr>
</table>
</div>
I had also tried like this.
$("#brandData").innerHTML = LastweeksData.d;
I cant able the see the div in the output. I dont know where i am wrong.