c# - get html response from local aspx page -


i have local .aspx page generate html message. when try request page using code

 html = new webclient().downloadstring("http://localhost/mysite/htmlemail.aspx")  

it returns html without passed data through session. if tried request page directly browser, displays html page passed data.

so why doesn't fill html message data when programmatic request page ?

it returns html without passed data through session

not if that's request being made, doesn't. session used track data across multiple requests made particular client. (effectively creating server-side "session" client.) if you're requesting 1 page 1 time there's no session state tracked in first place.

if you're making other requests (not shown in question) , server-side application isn't tracking session state problem may in server-side application, not in client.

if you're making other requests as client that's different session. different clients can't access each other's session state (for obvious reasons).


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -