Hello
How can i save cookies on 1st form and use it on 2nd form?
Hello
How can i save cookies on 1st form and use it on 2nd form?
Last edited by secureecs; 11-14-2009 at 10:48 AM.
Did not read title :b
Last edited by SheEpYW0lf; 11-14-2009 at 01:50 PM.
You want to have your cookies being stored seperately to form1. Or have them stored in public, so form2 can do form1.cookies (yes, that's never it, but prefixing form1).
Is there any chance for me to read a text or html and use some words from it into a label ?
Here you go:
You can have whatever extension on the file you want to read, just as long as it contains text inside it.Try
Dim fso, f
Const ForReading = 1
fso = CreateObject("Scripting.FileSystemObject")
f = fso.opentextfile(Application.StartupPath & "\YOUR-"COOKIE"-FILE.txt", ForReading)
TextBox1.Text = f.read(100000)
Catch ex As Exception
MsgBox("Could not find cookies!", MsgBoxStyle.Critical, "Error!")
End Try
You will receive an error if the file is blank (no text)![]()
Or that.Code:Dim fileContents as String Using myReader as System.IO.StreamReader = New System.IO.SteamReader(FilePath) Try fileContents = myReader.ReadToEnd() myReader.Close() Catch ex as Exception End Try
What i was trying to say is that i want to read the source of a webpage (html, xml, etc) using webbrowser controls and get a specified text from it.
Ex. from " <h2>Welcome, Daniel Dontu</h2>" i want to use in my label only the name " Daniel Dontu " and ignore the rest of the page.
Thank you so much,
You'll want to learn to use WebClient then, as a WebBrowser isn't the way to do it.
Well, using webbrowser i can read the content of that page, what i need to do is to return a value based on a specified line from that page. I can identify that line from page , but i don't know how to return his value.
I tried even using RegEx, but still don't understand where i do my mistake.
So, if you have any eg. that help me extract name located in a specified line that contains <h2>Welcome, Name</h2> please let me know how to.
?? why did you edit your post that is not nice...
Code:(<h2>Welcome, ).+?(</h2>)