Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FtpWebRequest - Help Needed
#3
(01-04-2012, 02:11 PM)AceInfinity Wrote:
Code:
request.Credentials = New System.Net.NetworkCredential(("Textbox1.Text"), ("Textbox2.Text"))

Why are you turning variables of string values into string values themselves?

For example IF:
• Textbox1.Text = "MyValue"

Then:
• Textbox1.Text = "MyValue"
BUT
• "Textbox1.Text" = "Textbox1.Text"

You're explicitly defining that as a string value itself. And you also don't need brackets around them.

Get rid of System.Net and import it as well.
Code:
Imports System.Net
Code:
request.Credentials = New NetworkCredential(Textbox1.Text, Textbox2.Text)

Don't turn into a copy and paste coder, you're not getting anywhere by doing that. And I can see that if you don't understand how types work, that you probably didn't make this. Learn the basics for yourself, and try to code things on your own. Work from beginner stages and move up.
Thanks for the help, and I didn't make this whole code.
I got this code from someone, and I'm trying to edit it so I can make my program using it.
Reply


Messages In This Thread
FtpWebRequest - Help Needed - by Die - 01-04-2012, 01:39 PM
RE: FtpWebRequest - Help Needed - by Die - 01-04-2012, 02:18 PM
RE: FtpWebRequest - Help Needed - by Die - 01-04-2012, 02:38 PM
RE: FtpWebRequest - Help Needed - by Die - 01-04-2012, 03:50 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)