Monday, April 21, 2014

Clear Textbox text using jQuery

In this tutorial I will show you how you can clear textbox value in jQuery

                $("#<%=TextBoxName.ClientID %>").val("");

To do this is javascript we can use document.getElementById

 document.getElementById('txtFolderName").value = "";

if the control is inside master page and you want to access it  from content page than use the following syntax

document.getElementById('<%=Master.FindControl("txtFolderName").ClientID %>').value = "";

I hope it was informative for you and I would like to Thank you for reading

No comments:

Post a Comment