I am assuming that you want to validate your textbox that whether it is blank or not on click of Search.
You can either use client side Javascript to alert the user or use a server side message to inform that textbox is blank.
Javascript Method:
function validateText()
{
if(document.getElementById("txtSearch").value == '')
{
alert("Please enter album name to search");
return false;
}
else
return true;
}
Call the above Javascript funtion on the ClientClick of your Search button as below:
<asp:button id="btnSearch" name="Search" onclientclick="return validateText()" onclick="btnSearch_Click"></asp:button>
ServerSide Method:
Inside btnSearch_Click event, write a code to display required message.
void btnSearch_Click(object sender, EventArgs e)
{
if(txtSearch.Text == "" || txtSearch.Text == string.Empty)
{
lblMessage.Text = "Please enter album name to search.";
}
}
Hope this helps.