Hi,
I'm using custom validation using ajax to check isExist data or not .
My Code:
[WebMethod]
public static bool DoesAddExistWithCategoryID(int categoryID)
{
return Parser.ParseBoolean(DB.ExecuteSQLScalar("SELECT count(*) as IsExists FROM tblCategoryAdds WHERE CategoryID=" +categoryID ));
}
<script type="text/javascript">
function doesAddExist(source, arguments) {
var catid = $("#<%=ddlCategory.ClientID%>").val();
var exists;
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/admin/bannersandadds.aspx/DoesAddExistWithCategoryID",
data: "{'categoryID': '" + catid + "'}",
dataType: "json& ...
Go to the complete details ...