Solved

c# string hide text

Posted on 2014-01-04
2
817 Views
Last Modified: 2014-03-18
Hi,

I have the following string

string sDetailsinTitle = "ID: " + sID + "Client Name: " + sClientName.PadRight(30) + "Mobile: " + sMobile + Environment.NewLine ;

Open in new window


Is there a way I can hide the ID from being displayed just like i have Environment.NewLine  which gives a new line break

Please help

thanks

R8VI
0
Comment
Question by:R8VI
2 Comments
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
ID: 39756517
inside a plain string, you cannot "hide" something.
as you posted this in asp.net also, you could put that part into a DIV that is hidden

for example:
string sDetailsinTitle = "<div name=\"ID\" style=\"display:none; visibility: hidden; \"> </div>" + sID + "</div>Client Name: " + sClientName.PadRight(30) + "Mobile: " + sMobile + Environment.NewLine ;

Open in new window

0
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 250 total points
ID: 39756883
Is this a Windows Form or Web project? In either case it will most likely be better to crate a second string without the ID in it.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now