Asp.Net Cookie sharing
Posted
by SH
on Stack Overflow
See other posts from Stack Overflow
or by SH
Published on 2010-05-16T10:00:30Z
Indexed on
2010/05/16
10:10 UTC
Read the original article
Hit count: 194
This is C#.Net code:
How to share Cookie between 2 HttpWebRequest calls?
Details:
I am posting a form in first request, this form contains some setting variables which are used by the system. lets say there is a input field in the form which sets the size of grid pages to be displayed in other pages.
Once i have updated the setings in previous request, i go to send a request to another page which shows off asp.net gridview/grid. The grid might contaian several pages and the page size should be the one which i set in previous request. But when i do this via HttpWebReeust it does not happen.
When i do it via browser, loading the setting page in the browser and then going to the grid view page... i see the page size is updated.
I want to achieve this via code. Sicne i am scraping this grid. i have to set page size or visit the gird pages one by one via code.
Or is it possible to set a cookie on 2nd request which is used to set in first request? It will be great if i go this way. any solution?
© Stack Overflow or respective owner