HTML Markup
<table>
<tr>
<td><asp:Label runat="server" Text="Subject: " /></td>
<td><asp:TextBox ID="txtSubject" runat="server" />
<asp:RequiredFieldValidator runat="server" ErrorMessage=" *" ControlToValidate="txtSubject" Font-Size="10pt" ForeColor="Red" />
</td>
</tr>
<tr></tr><tr></tr><tr></tr>
<tr>
<td><asp:Label runat="server" Text="Messages: " /></td>
<td><asp:TextBox ID="txtMessage" runat="server" TextMode="MultiLine" Height="100px" Width="18em" />
<asp:RequiredFieldValidator runat="server" ErrorMessage=" *" ControlToValidate="txtMessage" Font-Size="10pt" ForeColor="Red" />
</td>
</tr>
<tr></tr><tr></tr><tr></tr>
<tr>
<td><asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="Button" OnClick="SubmitFeedback" /></td>
<td><asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="Button" CausesValidation="false" ClientIDMode="Static" /></td>
</tr>
</table>
.JS
$(document).ready(function() {
$('#btnReset').click(function (e) {
clearTextBox(e);
});
});
function clearTextBox(e) {
e.preventDefault();
$('#txtSubject').val("");
$('#txtMessage').val("");
}
Both of the textbox value if unable to reset.
What i done wrongly in my code?