On my contact page I have some validation under submit click. When submit button click I want to show update progress on my contact form. Can I do it without using Asp.net update panel or script manager.
Update panel and script manager load another 300KB. It makes the page slow.
What should I do?
I have used jQuery validation and after validation i have used the code below:
$.ajax({
type: "POST",
url: "",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
success: function (msg) {
$("#progressbar").html("");
$("#result").text(msg.d);
clearInterval(intervalID);
}
});
Your situation sounds fairly standard, and I agree with jeschafe that 300k shouldn't cause any noticable slowdown. I believe that using an update panel in this case is the correct choice, however you can write your own solution doing something like this:
Create a page method where you will perform your validation and use jQuery to serialize your form and make an ajax call to the page method (Example Here). You can use a loading gif from a site like this and display it while you are waiting for the response, if the validation process is going to take a while.