<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DemoGrid.Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <script type="text/javascript"> function Clear() { var txts = document.getElementsByClassName('txts'); for (var i = 0; i < txts.length; i++) txts[i].value = ''; return false; } </script> <div> <asp:TextBox ID="txt1" runat="server" CssClass="txts"></asp:TextBox> <asp:TextBox ID="txt2" runat="server" CssClass="txts"></asp:TextBox> <asp:TextBox ID="txt3" runat="server" CssClass="txts"></asp:TextBox> <asp:TextBox ID="txt4" runat="server" CssClass="txts"></asp:TextBox> <input type="button" name="name" value=" Clear" onclick="Clear();" /> </div> </form> </body> </html>
Tuesday, 13 January 2015
Clear Multiple Textboxes in ASP.Net on Button Click
Labels:
ASP.NET
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment