473,498 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert.ToBase64 VB.net

8 New Member
Okay, I want to use
Convert.ToBase64
To convert www.youfail.org

This is my line of code so far:

Dim url As String

url = Convert.ToBase64("www.youfail.org")


How do i make it work?

Kthxbaibai VB.net Btw :/.
HALPPPP
Oct 30 '07 #1
7 4132
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
Okay, I want to use
Convert.ToBase64
To convert www.youfail.org

This is my line of code so far:

Dim url As String

url = Convert.ToBase64("www.youfail.org")


How do i make it work?

Kthxbaibai VB.net Btw :/.
HALPPPP
Expand|Select|Wrap|Line Numbers
  1. string s = "hello";
  2. System.Text.ASCIIEncoding encoder = new ASCIIEncoding();            
  3. string st = Convert.ToBase64String(encoder.GetBytes(s.ToCharArray()));
That should do what you want
Oct 30 '07 #2
Maxisking
8 New Member
How do i make
Expand|Select|Wrap|Line Numbers
  1. Dim url As String
  2.  
  3. url = System.Convert.ToBase64("www.youfail.org")
  4.  
How would i make www.youfail.org

I dont understand your code
Oct 30 '07 #3
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
How do i make
Expand|Select|Wrap|Line Numbers
  1. Dim url As String
  2.  
  3. url = System.Convert.ToBase64("www.youfail.org")
  4.  
How would i make www.youfail.org

I dont understand your code
Check my previous post.
Yes ive done it in c#, but you have to do the rest of the work to convert it to VB
unless someone else is happy to do that for you
Oct 30 '07 #4
Maxisking
8 New Member
Still confused. Anyone else please help :)
Oct 30 '07 #5
Plater
7,872 Recognized Expert Expert
Well "System.Convert.ToBase64()" doesn't even appear to exist so try this:

Expand|Select|Wrap|Line Numbers
  1. Dim mybytes As Byte() = Encoding.ASCII.GetBytes("www.youfail.org") 
  2. Dim url As String = Convert.ToBase64String(mybytes) 
  3.  
Oct 30 '07 #6
Maxisking
8 New Member
"Encoding" Is not Declared .. :/
Oct 31 '07 #7
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
"Encoding" Is not Declared .. :/
have you even tried looking up msdn to check which namespace it belongs to and import that namespace?

Its easier to search for theses things rather than post it at a forum and expect a answer in return for you....its faster if you search...
System.text
Oct 31 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

19
7245
by: Lauren Quantrell | last post by:
I have a stored procedure using Convert where the exact same Convert string works in the SELECT portion of the procedure but fails in the WHERE portion. The entire SP is listed below....
1
1787
by: Logan X via .NET 247 | last post by:
It's official....Convert blows. I ran a number of tests converting a double to an integer usingboth Convert & CType. I *ASSUMED* that CType would piggy-back ontop of Convert, and that performance...
4
3598
by: Eric Lilja | last post by:
Hello, I've made a templated class Option (a child of the abstract base class OptionBase) that stores an option name (in the form someoption=) and the value belonging to that option. The value is...
7
7071
by: whatluo | last post by:
Hi, all I'm now working on a program which will convert dec number to hex and oct and bin respectively, I've checked the clc but with no luck, so can anybody give me a hit how to make this done...
3
10238
by: Convert TextBox.Text to Int32 Problem | last post by:
Need a little help here. I saw some related posts, so here goes... I have some textboxes which are designed for the user to enter a integer value. In "old school C" we just used the atoi function...
7
29150
by: patang | last post by:
I want to convert amount to words. Is there any funciton available? Example: $230.30 Two Hundred Thirty Dollars and 30/100
3
11213
by: GeezerButler | last post by:
string s = "Hello"; byte abc = Convert.FromBase64String(s); This throws error "Invalid length for a Base-64 char array."?? Does anybody have any idea about how/why this happens?
1
3566
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
0
10705
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7005
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
659
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.