Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Open Points: 75 Time: 06:33 - Dec 22, 2008  

priyaravi2008

how to find out ascii values in asp.net?

i want to know how to find out the ascii values in asp .net using c#

Categories

Answer Discussion
Tutorials

 

nidhi

Date:: Mar 10, 2009

Time:: 06:09

Do u want to find a ascii value of a single character or a string?

Here is a simple example of converting a string to ascii values

I output the single character in the string on the console.
The combined ascii values is shown via a message box

String sSource = "priya";  // Specify source string
String sResult = "";   // Save result here

// Iterate thru each individual character
foreach (char c in sSource)
{
 Console.WriteLine((byte)c); // Dump that ascii value to the console
 sResult = sResult + (byte)c;
}
MessageBox.Show (sResult);  // Show combined ascii values to user

priyaravi2008

Date:: Mar 20, 2009

Time:: 07:22

Thankyou Nidhi.can u tell me how to findout ascii value for a single character?

nidhi

Date:: Mar 20, 2009

Time:: 08:18

If u want to check a character you could try this

int i;
char letter;

letter='A';
i = (int)letter;

admin

Date:: Apr 11, 2009

Time:: 10:48

The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.

The Quomon Team

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Tutorials cannot be submitted until the Answer Discussion is complete.

Submit answers in the Answer Discussion area

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10354

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es