Multiple colors
How can i make my text in multiple color?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 19, 2012, 2:08 AM EST
Try this...
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string s1="First text";
string s2="Second text";
Label1.Text += "" + s1 + " " + "" + s2 + "";
}
}
}
Thanks
Prabhu RajaRank #861 · 2.6K reputationPosted Jan 19, 2012, 6:51 AM EST
You can make your text with multiple Colors using Html Color Codes and Span tag like ,
Hello Emmy
Also you can use span tag to color each and every character in a string.
you can Get Most of All Color Codes from my Blog,
http://www.c-sharpcorner.com/Blogs/7220/html-color-codes.aspx