Click here to Skip to main content
15,896,726 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: A strange question about strings. Pin
εїзεїзεїз7-Sep-09 7:51
εїзεїзεїз7-Sep-09 7:51 
QuestionAudio Storing in Data Base Pin
Abdul_Rouf6-Sep-09 7:04
Abdul_Rouf6-Sep-09 7:04 
AnswerRe: Audio Storing in Data Base Pin
Luc Pattyn6-Sep-09 7:29
sitebuilderLuc Pattyn6-Sep-09 7:29 
AnswerRe: Audio Storing in Data Base Pin
Ray Cassick6-Sep-09 12:42
Ray Cassick6-Sep-09 12:42 
QuestionDate Refresh dont refresh ?? Pin
Bob Beaubien6-Sep-09 3:06
Bob Beaubien6-Sep-09 3:06 
AnswerRe: Date Refresh dont refresh ?? Pin
Luc Pattyn6-Sep-09 3:15
sitebuilderLuc Pattyn6-Sep-09 3:15 
GeneralRe: Date Refresh dont refresh ?? Pin
Bob Beaubien6-Sep-09 3:30
Bob Beaubien6-Sep-09 3:30 
QuestionCan´t maintain login session in manually edited webbrowser Pin
josemaloco6-Sep-09 1:35
josemaloco6-Sep-09 1:35 
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
εїзεїзεїз6-Sep-09 5:41
εїзεїзεїз6-Sep-09 5:41 
QuestionPress Enter key on command prompt in vb.net Pin
Gagan.205-Sep-09 23:55
Gagan.205-Sep-09 23:55 
AnswerRe: Press Enter key on command prompt in vb.net Pin
Henry Minute6-Sep-09 0:24
Henry Minute6-Sep-09 0:24 
GeneralRe: Press Enter key on command prompt in vb.net Pin
Gagan.206-Sep-09 17:15
Gagan.206-Sep-09 17:15 
QuestionHide a mapped network drive Pin
Member 43651665-Sep-09 23:30
Member 43651665-Sep-09 23:30 
AnswerRe: Hide a mapped network drive Pin
Henry Minute6-Sep-09 0:32
Henry Minute6-Sep-09 0:32 
AnswerRe: Hide a mapped network drive Pin
Dave Kreskowiak6-Sep-09 11:33
mveDave Kreskowiak6-Sep-09 11:33 
QuestionPassing parameter values from one form to populate a datagridview on another form. Pin
jeshra2795-Sep-09 19:50
jeshra2795-Sep-09 19:50 
AnswerRe: Passing parameter values from one form to populate a datagridview on another form. Pin
Paramu19735-Sep-09 21:04
Paramu19735-Sep-09 21:04 
QuestionRight Click / Options Menu Pin
Member 43745425-Sep-09 16:17
Member 43745425-Sep-09 16:17 
AnswerRe: Right Click / Options Menu Pin
Mycroft Holmes5-Sep-09 22:30
professionalMycroft Holmes5-Sep-09 22:30 
GeneralRe: Right Click / Options Menu Pin
Member 43745426-Sep-09 9:07
Member 43745426-Sep-09 9:07 
GeneralRe: Right Click / Options Menu Pin
Mycroft Holmes6-Sep-09 12:52
professionalMycroft Holmes6-Sep-09 12:52 
QuestionUpdate Image In DataBase Pin
Viper20105-Sep-09 11:53
Viper20105-Sep-09 11:53 
AnswerRe: Update Image In DataBase Pin
Mycroft Holmes5-Sep-09 12:56
professionalMycroft Holmes5-Sep-09 12:56 
Questiontelephone number word generator Pin
rbjanaki5-Sep-09 9:35
rbjanaki5-Sep-09 9:35 
AnswerRe: telephone number word generator Pin
Christian Graus5-Sep-09 10:47
protectorChristian Graus5-Sep-09 10:47 

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.