Solved

c# fill value into label1

Posted on 2011-02-15
2
378 Views
Last Modified: 2012-05-11
I want to fill label1 with  EmailsList how can i do that

 if(!string.IsNullOrEmpty(result))
                {
                    Coderbuddy.ExtractEmails helper = new Coderbuddy.ExtractEmails(result);
                    EmailsList = helper.Extract_Emails();
                    label1.TextAlign = EmailsList;
                   
                }
0
Comment
Question by:teera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 250 total points
ID: 34894864
What type is EmailsList  ? Is this a string or string[] ?

If string: your code is correct ...

if string[]: which do you want to show ? The first of the list or all ?
Show the first: label1.TextAlign = EmailsList[0];
All: label1.TextAlign = String.Join(";",EmailsList);
0
 
LVL 3

Assisted Solution

by:chandra_darbha
chandra_darbha earned 250 total points
ID: 34896912
If it is a string it should be label1.Text and not label1.TextAlign.

Thanks,
Chandra
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question