1

I am using WebBrowser control of .NET to login into a website. When i click on a button that popups a new window the popup window asks me to login again. However i am not asked to login again if i open the webpage in internet explorer. Is there any way to make the WebBrowser control store session so that i do not have to login again on the popup window.

Usman
  • 11
  • 1
  • 2
  • 2
    I know this is an old post. but I had to search for a while to find this answer. so I am posting this link here to make it easier for others. http://stackoverflow.com/questions/6470842/setting-popup-window-to-be-a-child-of-mdi-control-when-using-webbrowser-control?lq=1 –  Oct 01 '12 at 18:17

2 Answers2

3

To maintain the session state you can use the NewWindow2 event to open the new page in another form in the application; the event is triggered by the WebBrowser control.

Dharman
  • 30,962
  • 25
  • 85
  • 135
KMån
  • 9,896
  • 2
  • 31
  • 41
-1

Make sure that before clicking the button you already made Login.

In both cases, I think the solution which I am going to give will work for you.

For this purpose, I think you place login fields in panel and on page_load check either session empty or not if not then visible it false if yes then visible it true.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Emaad Ali
  • 1,483
  • 5
  • 19
  • 42