Hi, try to use javacript funcion below:
function myFunction()
{
var x;
x = document.getElementById('<%= textBoxCustomerCode.ClientID %>').value;
if(isNaN(x) || x == "")
{
alert('Problem input');
return false;
}
else
{
return true;
}
}
call the function by code below:
<asp:ImageButton ID="imageButtonView" runat="server" Height="60px" ToolTip="بحث" Width="60px" BorderStyle="Solid" ImageUrl="~/Images/searchButton.jpg" OnClick="imageButtonView_Click" OnClientClick="return myFunction();"/>