{"id":3951,"date":"2022-12-17T02:33:40","date_gmt":"2022-12-17T02:33:40","guid":{"rendered":"https:\/\/isophal.com\/?p=3951"},"modified":"2022-12-17T03:12:17","modified_gmt":"2022-12-17T03:12:17","slug":"how-to-change-textbox-control-font-and-style-in-asp-net","status":"publish","type":"post","link":"https:\/\/isophal.com\/news\/2022\/12\/17\/3951.html\/","title":{"rendered":"How to Change TextBox Control Font and Style in ASP.NET"},"content":{"rendered":"\n<p>In this post we are going to learn how to change TextBox Control Font Size,&nbsp; TextBox Color, Background all style of Textbox control in ASP.Net TextBox Example.<\/p>\n\n\n\n<p>First, Design the Page with One TextBox control along with 2 Button Control.<\/p>\n\n\n\n<p><strong>Write below code in Body tag :<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"688\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2022\/12\/image-12-1024x688.png\" alt=\"\" class=\"wp-image-3952\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12-1024x688.png 1024w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12-600x403.png 600w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12-300x202.png 300w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12-768x516.png 768w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12-1170x786.png 1170w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12-585x393.png 585w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-12.png 1223w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The Design form look like below screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2022\/12\/image-13-1024x538.png\" alt=\"\" class=\"wp-image-3953\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13-1024x538.png 1024w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13-600x315.png 600w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13-300x158.png 300w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13.png 1200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13-768x403.png 768w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13-1170x614.png 1170w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-13-585x307.png 585w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Change TextBoxt Font Style in ASP.NET \u2013 ASP.NET TextBox Example<\/figcaption><\/figure>\n\n\n\n<p><strong>\u2013 Now write the Below code in Style1 Button Click Event:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>protected void Button1_Click(object sender, EventArgs e)<br>{<br>TextBox1.ForeColor = System.Drawing.Color.Red;<br>TextBox1.Font.Size = 17;<br>TextBox1.Font.Bold = true;<br>TextBox1.BackColor = System.Drawing.Color.Yellow;<br>}<\/code><\/pre>\n\n\n\n<p>The ASP.NET TextBox Example Output is :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"386\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2022\/12\/image-14-1024x386.png\" alt=\"\" class=\"wp-image-3954\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-14-1024x386.png 1024w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-14-600x226.png 600w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-14-300x113.png 300w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-14-768x289.png 768w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-14-585x220.png 585w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-14.png 1038w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Change TextBox Font Style in ASP.Net \u2013 ASP.Net Textbox Example<\/figcaption><\/figure>\n\n\n\n<p>\u2013 Write Below code in Style2 Button Click Event :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"703\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2022\/12\/image-15-1024x703.png\" alt=\"\" class=\"wp-image-3955\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15-1024x703.png 1024w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15-600x412.png 600w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15-300x206.png 300w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15-768x527.png 768w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15-1170x803.png 1170w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15-585x401.png 585w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-15.png 1220w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>protected void Button2_Click(object sender, EventArgs e)<br>{<br>TextBox1.ForeColor = System.Drawing.Color.Green;<br>TextBox1.BackColor = System.Drawing.Color.White;<br>TextBox1.Font.Underline = true;<br>TextBox1.Font.Italic = true;<br>TextBox1.Font.Bold = false;<br>}<\/code><\/pre>\n\n\n\n<p>The ASP.Net TextBox Example Result is :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"839\" height=\"310\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2022\/12\/image-16.png\" alt=\"\" class=\"wp-image-3956\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-16.png 839w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-16-600x222.png 600w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-16-300x111.png 300w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-16-768x284.png 768w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2022\/12\/image-16-585x216.png 585w\" sizes=\"auto, (max-width: 839px) 100vw, 839px\" \/><figcaption class=\"wp-element-caption\">Change TextBox Font Style in ASP.Net \u2013 ASP.Net TextBox Example<br><\/figcaption><\/figure>\n\n\n\n<p>\u2013 In this ASP.NET Texbox Example post we got the knowledge about how to change TextBox Font Size and all Textbox style in ASP.Net<\/p>\n\n\n\n<p>\u2013 Hope you enjoyed this ASP.Net TextBox Example Tutorials.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post we are going to&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3953,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[189,140],"tags":[191],"class_list":["post-3951","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net","category-programming","tag-asp-net"],"_links":{"self":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts\/3951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/comments?post=3951"}],"version-history":[{"count":2,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts\/3951\/revisions"}],"predecessor-version":[{"id":3967,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts\/3951\/revisions\/3967"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/media\/3953"}],"wp:attachment":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/media?parent=3951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/categories?post=3951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/tags?post=3951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}