I have a webform with 3 textboxes, a checkbox and a Reset button. I need these to be reset to null values when i click the button “Reset” and i need it to be a Client-Side operation. The JS code that i have tried for this is as follows but for some reason it doesnt work. Any Help PLease?
<code>
<script type="text/javascript">
function resetForm() {
document.getElemenyById("<%=txtbox1.ClientID%>").value = "";
return false;
}
</script>
<asp:LinkButton ID="wbtnReset" runat="server" Text="RESET PAGE" CssClass="stdHyperlink" Font-Bold="True" OnClientClick="javascript:return resetForm()"/>
</code>
Try the below code
you can do it the simple way if you are using .NET 4.0. use ClientIDMode=”Static” and use below line in javascript
hope it helps