Other Languages - MVC Razor - Asked By Dipti Mohanty on 21-Mar-12 03:37 AM

In MVC how can i change the text color?
kalpana aparnathi replied to Dipti Mohanty on 21-Mar-12 03:51 AM
hi,

Try this way for change the text color :

txtbox1.Attributes.Add("style", "color:red");

Regards,
D Company replied to Dipti Mohanty on 21-Mar-12 05:30 AM
U can also go in to the site.css and create style for the text  over there and add the reference to that css. like this

<head runat="server">

<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" />

</title>

<link href=


"<%=ResolveUrl("~/") %>Content/Site.css" rel="stylesheet" type="text/css"/>

</head>


Hope this helps
Regards
D