vasco16 Posted May 8, 2009 at 06:52 PM Report #262462 Posted May 8, 2009 at 06:52 PM Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUrl.Leave If txtUrl.Text.Length < 1 Then txtUrl.Text = "http://www.macoratti.net" End If webb1.Url = New System.Uri(txtUrl.Text) End Sub pessoal estou a ter um erro no uri, tenho alguma coisa mal?:S
Ivo Pereira Posted May 8, 2009 at 08:34 PM Report #262489 Posted May 8, 2009 at 08:34 PM tenta deixar este código txtUrl.Text = "http://www.macoratti.net" e tirar os if's.
vasco16 Posted May 8, 2009 at 09:55 PM Author Report #262510 Posted May 8, 2009 at 09:55 PM tenta deixar este código txtUrl.Text = "http://www.macoratti.net" e tirar os if's. pelo que percebi quando meto o link tenho de meter o protocolo, ou seja http://www.google.pt e assim ja funciona..
Ivo Pereira Posted May 8, 2009 at 10:33 PM Report #262519 Posted May 8, 2009 at 10:33 PM Mas tu no exemplo acima tens o protocolo, logo como é que te dá o erro na mesma?
vasco16 Posted May 8, 2009 at 10:51 PM Author Report #262523 Posted May 8, 2009 at 10:51 PM Mas tu no exemplo acima tens o protocolo, logo como é que te dá o erro na mesma? segundo a condição: If txtUrl.Text.Length < 1 Then txtUrl.Text = "http://www.macoratti.net" End If webb1.Url = New System.Uri(txtUrl.Text) se não tiver nada escrito ele escreve-me esse site mas se escrever outro site tem de ser com o protocolo http senao, nao funciona..
passado Posted May 9, 2009 at 11:24 AM Report #262597 Posted May 9, 2009 at 11:24 AM segundo a condição: se não tiver nada escrito ele escreve-me esse site mas se escrever outro site tem de ser com o protocolo http senao, nao funciona.. Podes sempre um teste senao tiver o http:// ele adiciona sozinho
vasco16 Posted May 9, 2009 at 12:23 PM Author Report #262605 Posted May 9, 2009 at 12:23 PM Podes sempre um teste senao tiver o http:// ele adiciona sozinho foi o que fiz
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now