user1996052
user1996052

Reputation: 1

How do I patch together url's in Visual Basic?

I'm basically completely new at this, and I haven't been able to figure it out on my own. My question is how to take an existing url (http://www.minecraft.net/haspaid.jsp?user= specifically, it's a program that in part checks to see if minecraft users are premium) and add to the end a username specified in a textbox. So, it would build the link http://www.minecraft.net/haspaid.jsp?user=whateverguy123 when textbox1.Text = whateverguy123. I'm still working on something to actually grab the text from the web page and check to see if it says 'true' or 'false,' so that's not technically a part of my question, but I'd like any help you can toss my way with that either. Thanks, and sorry for the rather simple question!

Upvotes: 0

Views: 63

Answers (1)

Kansha
Kansha

Reputation: 570

What you want is called concatenating a string.

So say you have

Dim url as String
url = "http://www.minecraft.net/haspaid.jsp?user=" + textbox1.Text

Some people prefer the & instead of +. Both do the same thing. But you need to make sure both variables are strings in either case.

Not sure what you wanted to do with the link, etc from your question. But this puts you on the right track I hope.

Upvotes: 1

Related Questions