Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

c# string hide text

Posted on 2014-01-04
2
Medium Priority
?
1,049 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 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 1000 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 64

Accepted Solution

by:
Fernando Soto earned 1000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 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