Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

c# string hide text

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

715 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