Hi
Thanks all for your help. After lots of work, I found that viewbag is not at all coming under jQuery function during runtime.
I tried all below like
var Result = '@ViewBag.Message'
var Result = @Html.Raw(ViewBag.Message)
$("#showDetails").html("<p><b>" + Result+ "</b>");
So finally, I just placed viewbag under my DIV. Like below and it worked.
<div id="showDetails">
<p><b>@ViewBag.Message</b></p>
</div>
Thanks again.