Click here to Skip to main content
15,885,365 members
Home / Discussions / Web Development
   

Web Development

 
Questionimporting .txt files in html tables Pin
Rickey Cooper6-Sep-09 15:49
Rickey Cooper6-Sep-09 15:49 
AnswerRe: importing .txt files in html tables Pin
Christian Graus6-Sep-09 17:07
protectorChristian Graus6-Sep-09 17:07 
GeneralRe: importing .txt files in html tables Pin
Rickey Cooper6-Sep-09 17:38
Rickey Cooper6-Sep-09 17:38 
GeneralRe: importing .txt files in html tables Pin
Christian Graus6-Sep-09 20:09
protectorChristian Graus6-Sep-09 20:09 
AnswerRe: importing .txt files in html tables [modified] Pin
quadrilateral19-Oct-09 17:58
quadrilateral19-Oct-09 17:58 
QuestionAdd existing database Pin
mhh1126-Sep-09 12:43
mhh1126-Sep-09 12:43 
AnswerRe: Add existing database Pin
SeMartens6-Sep-09 20:57
SeMartens6-Sep-09 20:57 
QuestionCan´t maintain login session in manually edited webbrowser Pin
josemaloco6-Sep-09 6:07
josemaloco6-Sep-09 6:07 
I want to create "views" of a web page, to do that I´m retrieving and editing the html code to show what I want in a new small webbrowser:

Dim PageHTMLBytes() As Byte
Dim htmlText as string = ""

PageHTMLBytes = webClient.DownloadData(url)
' Convert result from byte array to string
Dim utf8 As New UTF8Encoding()
htmlText = utf8.GetString(PageHTMLBytes)
...
-Edit of the html code-
...
miniWebBrowser.DocumentText = editedhtmlText

The problem is that one part of the editedhtmlText I´m showing, is a flash object which checks if you are logged in, but it doesn´t matter if I logged before, as soon as I set my own, edited code, the session is lost. I tried setting cookies like this:

Dim request As HttpWebRequest = WebRequest.Create("http://www.cam4.com")

'Set cookies.
request.CookieContainer = New CookieContainer()
request.CookieContainer.Add(New Cookie("user", "usuario1", "/", url))
request.CookieContainer.Add(New Cookie("password", "password1", "/", url))

Dim response As HttpWebResponse = request.GetResponse()
Dim reader As IO.StreamReader = New IO.StreamReader(response.GetResponseStream(), True)
Dim html As String = reader.ReadToEnd()
web.DocumentText = html

..which throws no errors but no luck at all in keeping my session. I started to fiddle about with webrequest and responses instead of downloading the html code, but I couldn´t go much further.

I´m on Windows XP 32 bits, VB 2008 Express, Net. Framework 2.0 SP1 (for legacy support). Some assistance on how can I aboard this problem will be appreciated.


AnswerRe: Can´t maintain login session in manually edited webbrowser Pin
Abhishek Sur6-Sep-09 11:29
professionalAbhishek Sur6-Sep-09 11:29 
GeneralRe: Can´t maintain login session in manually edited webbrowser [modified] Pin
josemaloco8-Sep-09 7:41
josemaloco8-Sep-09 7:41 
Questionquery Pin
sheemap5-Sep-09 9:05
sheemap5-Sep-09 9:05 
AnswerRe: query Pin
sheemap5-Sep-09 9:58
sheemap5-Sep-09 9:58 
AnswerRe: query Pin
Abhishek Sur5-Sep-09 11:27
professionalAbhishek Sur5-Sep-09 11:27 
QuestionCannot See ASP.Net Web Items When Trying to Add New... Pin
dboy2214-Sep-09 17:34
dboy2214-Sep-09 17:34 
AnswerRe: Cannot See ASP.Net Web Items When Trying to Add New... Pin
Abhijit Jana4-Sep-09 21:01
professionalAbhijit Jana4-Sep-09 21:01 
GeneralRe: Cannot See ASP.Net Web Items When Trying to Add New... Pin
dboy2217-Sep-09 15:23
dboy2217-Sep-09 15:23 
QuestionAsync File Transfer in IE Pin
mmuttmax4-Sep-09 3:24
mmuttmax4-Sep-09 3:24 
AnswerRe: Async File Transfer in IE Pin
Abhishek Sur5-Sep-09 11:31
professionalAbhishek Sur5-Sep-09 11:31 
Questionhow to create a dropdown menu from an XML using PHP Pin
Emmet_Brown3-Sep-09 22:29
Emmet_Brown3-Sep-09 22:29 
AnswerRe: how to create a dropdown menu from an XML using PHP Pin
Marc Firth4-Sep-09 2:40
Marc Firth4-Sep-09 2:40 
Questionwinform to WebService First call very slow... Pin
ahkayastha3-Sep-09 7:38
ahkayastha3-Sep-09 7:38 
AnswerRe: winform to WebService First call very slow... Pin
SeMartens3-Sep-09 21:22
SeMartens3-Sep-09 21:22 
QuestionWeb page and screen resolution problem Pin
dcode253-Sep-09 5:21
dcode253-Sep-09 5:21 
AnswerRe: Web page and screen resolution problem Pin
Marc Firth3-Sep-09 14:11
Marc Firth3-Sep-09 14:11 
AnswerRe: Web page and screen resolution problem Pin
Abhishek Sur3-Sep-09 21:46
professionalAbhishek Sur3-Sep-09 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.