开发者

Form Processing ASP.NET

开发者 https://www.devze.com 2022-12-28 11:17 出处:网络
I have created a website survey that is in the footer of our site.Obviously the footer is on every page within our site.

I have created a website survey that is in the footer of our site. Obviously the footer is on every page within our site.

There is a link in the footer that opens a very basic include via开发者_运维百科 jQuery toggle. (form.aspx)

Once the form is submitted it is sent to another page that is not using jQuery toggle for processing (processing-form.aspx). Which takes the user away from the page they might be visiting.

What can I do to keep the user experience in tact and not have to process on another page, and redirect back, or make a link "click here to return to the page you were on".


What you want to do is to have your survey process the form submission via AJAX, which will allow it to be processed without a full round trip to the server. Once the form is submitted, you can then use your jQuery code to hide the form.

A nice article about accomplishing such a task can be found here.


Use an HTTP handler instead of a separate page, and use jQuery to make an asynchronous call to the page and display some sort of "Thank you for responding" message in place of your survey.

http://www.15seconds.com/Issue/020417.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消