Solved

c# string hide text

Posted on 2014-01-04
2
848 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

16 Experts available now in Live!

Get 1:1 Help Now