I have written a code
function validate()
{
if(document.getElementById("<%=txtSearch.ClientID %>").value=="")
{
message="Enter the User Id To Search";
document.getElementById("<%=lblMessage.ClientID %>").innerHTML=message;
return false;
}
Here I am using <%= %> tags. I want to know how do they work without making a trip to the server?
They don’t.
The server fills them in before sending the JS file to the client.