$("#btnStartChat").click(function () {
var name = $("#txtNickName").val();
var pass = $("#txtPassword").val();
if (name.length > 0 && pass.length > 0) {
var msg="";
msg='<%= CheckExistance(name,pass) %>';
if(msg.trim()=="")
{
alert("Success !");
}
else
{
alert(msg);
}
}
else
{
alert("Please Insert UserName and Password");
}
});
Codebehind:
public String CheckExistance()
{
}
Note: I haven't executed the program. Please check once and in case it doesn't work, let me know :)