ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Change font family and size of paragraph using CSS in ASP.Net<p>Hi <a class="username" rel="chetan"> chetan</a>,</p> <p>Please take reference the below code and correct your code.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head runat=&#34;server&#34;&gt; &lt;title&gt;&lt;/title&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js&#34;&gt;&lt;/script&gt; &lt;link rel=&#34;stylesheet&#34; href=&#34;http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css&#34; /&gt; &lt;link href=&#39;https://fonts.googleapis.com/css?family=Poppins&#39; rel=&#39;stylesheet&#39;&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;div class=&#34;container&#34;&gt; &lt;div class=&#34;newscon&#34;&gt; &lt;h2&gt; &lt;b style=&#34;font-family: Arial, Helvetica, sans-serif; color: #1ea421&#34;&gt; &lt;asp:Label ID=&#34;newsheader&#34; runat=&#34;server&#34; Text=&#34;&#34;&gt;&lt;/asp:Label&gt;&lt;/b&gt;&lt;/h2&gt; &lt;br /&gt; &lt;asp:Image runat=&#34;server&#34; ID=&#34;ImgNews&#34; /&gt; &lt;p runat=&#34;server&#34; style=&#34;text-align: justify; font-family: &#39;Poppins&#39;; font-size: 30px;&#34; id=&#34;newscontent&#34;&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p><span style="text-decoration: underline;"><strong>Namespaces</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">using System.Data.SqlClient; using System.Configuration;</pre> <p><span style="text-decoration: underline;"><strong>Code</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { string str = ConfigurationManager.ConnectionStrings[&#34;conString&#34;].ConnectionString; using (SqlConnection con = new SqlConnection(str)) { using (SqlCommand cmd = new SqlCommand(&#34;SELECT Name, Country FROM Customers&#34;, con)) { con.Open(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { newsheader.Text = HttpUtility.HtmlDecode(dr[&#34;Name&#34;].ToString()); newscontent.InnerText = HttpUtility.HtmlDecode(dr[&#34;Country&#34;].ToString()); con.Close(); } } } } }</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://i.imgur.com/gZ2v4uQ.jpg" alt="" width="490" height="257" /></p>https://www.aspforums.net:443/Threads/131995/Change-font-family-and-size-of-paragraph-using-CSS-in-ASPNet/https://www.aspforums.net:443/Threads/131995/Change-font-family-and-size-of-paragraph-using-CSS-in-ASPNet/Wed, 27 Jun 2018 03:43:38 GMT