ASP.NET Engine did every thing for you. Web browser can only understand Html mark up, So ASP.NET Engine can convert server side controls as html control in runtime and render it as page.
<%= %>
This is used to access the server side code, or variables like this <%=txtSearch.ClientID %>
You put debugger in javascript code, and analyse it , you can not see this <%=txtSearch.ClientID %>
instead you can see the client id of your server control.
function validate()
{
debugger;
// analyse your seach textbox id, you can not see this `<%=txtSearch.ClientID %>`
if(document.getElementById("<%=txtSearch.ClientID %>").value=="")
{
message="Enter the User Id To Search";
document.getElementById("<%=lblMessage.ClientID %>").innerHTML=message;
return false;
}