I found somthing guyz. When I remove my Gobal.asax file all validations are working properly!! I don't understand. I only have this in my Global.asax file.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;
using System.Web.Security;
using System.Web.SessionState;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using MyWebsite.Libraries.Global;
namespace MyWebsite.Website
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("default", "", "~/default.aspx");
routes.MapPageRoute("view", "view", "~/quick.aspx");
routes.MapPageRoute("view/id", "view/{id}", "~/quick.aspx");
routes.MapPageRoute("slug", "{slug}", "~/page.aspx");
routes.MapPageRoute("contact-us", "contact-us", "~/contact-us.aspx");
}
protected void Session_Start(object sender, EventArgs e)
{
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
protected void Application_Error(object sender, EventArgs e)
{
}
protected void Session_End(object sender, EventArgs e)
{
}
protected void Application_End(object sender, EventArgs e)
{
}
}
}