473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

textbox byte

i have a method like this

public void MethodName(byte[] data)
{
}

and the textbox.text is the one suppying the argument to the method but my
problem is its a string... how can i do this? any example please? i would
really appreciate any help at all.
Aug 14 '06 #1
2 2050
Well it depends.. will the textbox only be accepting numbers, and thus
creating a list of numbers between 0 and 9 which get translated
directly into your array of bytes on a 1 for 1 basis?

Or ... will the textbox accept any input, and you want to translate the
characters into single bytes?

There is the whole unicode deliberation of course...

Aug 14 '06 #2
Hi Rain,

As Steven said, the method will vary depending on what 'data' actually is.
If you just want to get text as byte[], use Encoding.GetBytes, specifying
the encoding you want the bytes in.

It would help if you told us what 'data' is
On Mon, 14 Aug 2006 08:53:02 +0200, Rain <Ra**@discussions.microsoft.com>
wrote:
i have a method like this

public void MethodName(byte[] data)
{
}

and the textbox.text is the one suppying the argument to the method but
my
problem is its a string... how can i do this? any example please? i would
really appreciate any help at all.


--
Happy Coding!
Morten Wennevik [C# MVP]
Aug 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: hennie | last post by:
Hello, I've define a TextBox As Byte. Only numeric can be the input. I have made a ErrorCheck(). The problem next: If Val(Form1.txtText1.Text) "This is the problem" is not a byte Then etc. ...
8
by: jan Veenstra | last post by:
Hi, I am having two problems with Access 97. These '2 problems are posted seperately in this newsgroup. Here's the first: I have a form with lots of similar textboxes and I have a procedure...
2
by: nitin8or | last post by:
Hi ALL, I want to display in a RichTextBox the Binary Large Objects data coming from database. If I have one record its not a problem I convert it to byte array and pass it on in a stream as a...
0
by: Newasps | last post by:
Hi guys, I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the...
7
by: Drew Berkemeyer | last post by:
I've encounted a pretty strange problem and I'm not quite sure what to make of it. I have a web service that consumes an XML file as well as a few other parameters. This web service works fine...
9
by: tawright915 | last post by:
I want to convert a byte array to a string or text to write it out in a multiline textbox. I've tried encoding, and converting but end up with nothing in the textbox. The strange thing is that...
7
by: robert.waters | last post by:
I have an Access database frontend linked via ODBC to a large (gigabytes) mysql database. I need to view a large amount of data in a a textbox (variable up to 300K), but I receive a 'there isnt...
5
by: =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?= | last post by:
I'm sorry, but I've read your code a couple of times and just don't see where the Form1 is initialized. Form1 also sounds like a class name, and this would be how you could do some form operations...
1
by: dantz | last post by:
Hi everyone, I have a textbox which is multiline and wordwrap is true. I did not set any scrollbar because I want to show it manually (using different buttons) The textbox will sometimes have...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.