For the sake of testing im creating a button that will hide a text box when clicked. The javascript for the button press looks like:
function showCommentBox() {
var el = document.getElementById('replyBox');
el.setAttribute("style", "display:none;");
return false;
}
The asp code looks like:
<textarea id="replyBox" runat="server" class="replyBox"></textarea>
<asp:Button runat="server" id="replyBtn" onClientClick="return showCommentBox();" class="replyBtnClass" Font-Bold="true" Text="Reply"/>
It seems that whenever I try modifying an element running on server it causes a postback. Is there something wrong with my logic or is this just not posible?