.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Convert array to Text

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :Windows Application

I am using MS Visual Studio 2008, Standard Edition, Visual C++, CLR Windows Forms Application.

I have an array and I would like to know how to place one of the members of the array into a textBox. It could be any one of the members. It seems like this should be an easy thing to do but I cant figure it out.

The array is;  array<DriveInfo^>^ DI = DriveInfo::GetDrives(); 

textBox1->Text = one of the array members

Does anyone know how to place a member of the array into a Windows Form textBox?


View Complete Post

More Related Resource Links

convert xml file as text file using xml document

hi i want to convert to xml file to text file using xml document.. M not much aware of xml..so please guide me.... my boss told me don use xmltextreader and using xml document convert to txt file.....  

How to convert both text and image into image

Hi, Here is a question. how to convert both text and image together into an image. To clarify my question I can say if I have a text editor where I can add both text,image,audio or video player, how can I convert the whole texteditor.text (it gives me html code) to an image and save it in a file. I will be highly pleased with your answer. Help me please. Thank you. 

how to convert the text to mp3 speech format

im working on a applicatio that will speak out a text file for you. i have code to read a text file but can not directly convert and save in mp3 format.. need help.. :)

Need to convert query string(date - 09/15/2010) to a text format - yyyymmdd

I am fairly new to C # and need some assistance with a form page.  I have created a simple form that requires the user to select a beginning date and ending date.  I then pass the values to my code behind page via query strings.  I have them passing, but I need the format to be change to a different format.  Unfortunately the database does not use the standard date format.  It requires the date to be in a text format as YYYYMMDD.Form: <tr> <td> Beginning Date:</td> <td><asp:TextBox runat="server" ID="begDate"></asp:TextBox> <asp:Image ID="Image2" ImageUrl="~/images/calendar_schedulehs.png" runat="server" /></td> </tr> Code Behind: protected void createReport_Click(object sender, EventArgs e) { StringBuilder url = new StringBuilder("Report/TopCustomer.aspx?"); url.Append("BegDate=" + begDate.Text); url.Append("&EndDate=" + endDate.Text); url.Append("&Brnch=" + ddlLocation.SelectedValue); Response.Redirect(url.ToString()); Current URL: TopCustomer.aspx?BegDate=09/15/2010&EndDate=09/30/2010&Brnch=300I need to have the above URL change to:TopCustomer.aspx?BegDate=20100915&E

Convert from Number to Text- Exporting to Excel from SQL Reporting services 2000

I was trying to export a report which contains a number format. When I do that, all the numbers in excel will have a green small tag beside it saying "Convert from Number to Text". Is there anyway that I can change the format to a number when I export it to excel?

convert Label text to integer

Hi, I want to convert Label text into Integer datatype.  I tried by giving Convert.Int32(Label1.Text) and int.Parse(Label1.Text)  but I couldn't do Type casting . I am getting error at runtime.    I searched in web I couldn't get the solution. Please help me....

Convert PDF to Text?



Is there an example of coverting PDF fillable forms to text or xml thru asp.net code behind?

Below is the senario:

User fills out a fillable pdf form then submit.

I'll receive the form as an attachment thru email.

On my  web application,  a button is clicked to automatically convert pdf fillable form to text or xml then insert into database.

Any suggestion is welcome.


Convert Text to Numeric in reports generated by Microsoft SQL Server 2000

Our programming team is producing Excel reports using Microsoft SQL Server 2000 and cannot seem to find a way to produce numeric data as numeric.  It is being produced in the spread sheet as text (with the green triangle in the corner of the cell).  If the user viewing the report has an older version of Excel they cannot even convert it to numeric manually. 

Is there a way to produce numeric data as numeric in the Excel report?

Help Needed to convert 2 - dimentional array to xml file


Hi Friends,

          I am having an issue with 2 - dimentional array.

Will you please help on this.


I getting table data as object from SAP Rfcs using SAP Automation Activex Controls.

data object has columns as 1 - dimentional array and rows as 2 - dimentional array

I need to convert this table object into xml without using loops ( for higher performance)

XML Format :









Below is the code which i have written:

                 Dim objTable As Object = myFunction.Tables("IOUTPUT_DATA")

                Dim ds As New DataSet("IOUTPUT_DATA")
                Dim dt As New DataTable("ITEM")

How to convert .html format data to normal text using Regular Expressions?

How to convert .html format data to normal text using Regular Expressions?

Reading in values in text file in a project solution to an array



I have a tab delimited text file that has 6 columns (all integers) and 500 rows (and no column headings) called ProjectData.txt that I have added to my Windows Form Application (c#) (by added I mean I have it in my project solution). 

I have declared an array in my code called ProjectDataArray which has dimensions [500, 6].

I wish to load each column of each row into the array.

All the code I have seen shows how to do this for text files that are not included in the project solution. 

Is this easy to do?

cannot convert a text to unicode




I have got a byte array and want to convert it into a image

Byte[] photo = Convert.FromBase64String(value);
//old 1
MemoryStream ms = new MemoryStream(photo, 0, photo.Length);
ms.Position = 0;
ms.Write(photo, 0, photo.Length);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms, true);// this line giving exception parameter not valid


Convert text from UTF8 to ASCII



I'm trying to convert text from UTF8 to ASCII.

I need to generate a text file with ASCII encoding. But when I create the file, special caracters are wrote  with unknown format.

Could any one say what I'm doing wrong  in the code bellow?


FileStream textStream = File.Open(caminhoArquivoTexto, FileMode.Create, FileAccess.Write);

StreamWriter textWriter = new StreamWriter(textStream, Encoding.ASCII);

StringBuilder registro = new StringBuilder();

registro.Append("Otávio Camaçarão"); //Name with special caracters

ASCIIEncoding ascii = new ASCIIEncoding();
byte[] byteArray = Encoding.UTF8.GetBytes(registro.ToString());
byte[] asciiArray = Encoding.Convert(Encoding.UTF8, Encoding.ASCII, byteArray);
string finalString = ascii.GetString(asciiArray);


Convert comma delimited record to string array


Is there any efficient way to convert a comma delimited record with quotes to string array?

Say, "Peter","Pan",123,"Hello, is it ok",Test
str[0] = "Peter"
str[1] = "Pan"
str[2] = 123
str[3] = "Hello, is it ok"
str[4] = "Test"

That is comma within quotes are not treated as delimited


Convert text to HTML



I'm using WPF and dotnet 3.5 for my application. Now I want to convert a string value to html. In this case it's only about all special letters as & % å ä ö etc, since the rest is already in html. How to do this? I have seen articles about htmlencoder, but in wpf and dotnet 3.5 I can't find this object.

Please help

Magnus Burk

AutoCompleteStringCollection for text box in DataGridView 2.0

I have been searching for a way to have autocomplete in a DataGridTextBox
object. There does not appear to be an obvious way to do this like you would
for a TextBox outside of a grid using the AutoCompleteCustomSource. Any
thoughts on how I can add this collection? :)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend