开发者

Difference between Page refresh and Page postback

My question is - what is the difference between page refresh (if I press f5) and postback (If I press a button)?

Can anyone please tell me?

Thanks in adva开发者_开发问答nce.


A refresh mean a complete reload of the page, without any form data. This is essentially an HTTP GET.

A post back is when the page is posted to itself (through the form action=""). This is essentially an HTTP POST.


Lets have the actual difference between refresh and explicitily submitting a page :

1) Refresh does not mean to post back the page with get method..(You can check it with response.write request.form("some input type")).

2)Difference lies with the data sent to the server : in case of explicit submit form is submitted with latest value(i.e it recognize the changes in form elements) But in case of refresh, form is submitted with default form value.(i.e if you change the value of form element it will not reflect at server.)


when page is refresh that means page is sending request to server without any data that means HTTP GET but in another case suppose a event is fired that causes postback after page completely load on browser if we press f5 or do refresh then it will send privious data with request instance, that means again for that data server will perform operation... have u seen somtimes while you are doing online sopping after selecting item and press accepet button uyou get total price ,now again if you refresh then for that selected item it will again go to server that means you are buying same things twice.....i think now you get everything what i want to say...

                           in  when page is postback then code of that page again compile and also processing `request data`. this process will going on
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜