Asp.net calls the system to set the font text box, asp.net system settings

Source: Internet
Author: User

Asp.net calls the system to set the font text box, asp.net system settings

This example shows how asp.net calls the system to set the font text box. It is a practical technique in web development. The specific implementation steps are as follows:

1. Call the system font text box

First, right-click the bin folder and choose System. Windows. Forms> OK from the Add reference tab.

Then introduce the following in the cs file:

using System.Windows.Forms; 

Add the following code:

FontDialog fd = new FontDialog();fd.ShowDialog().ToString();

You can call up the text box in which the system sets the font.

2. Use the FontDialog text box to set the font style and size.

FontDialog fd = new FontDialog();fd.ShowDialog().ToString();Label1.Font.Name = fd.Font.FontFamily.Name.ToString();Label1.Font.Size = Convert.ToInt32(fd.Font.Size);

I hope this article will help you design your asp.net program.


In ASPNET, how does one dynamically set the font size and color in TextBox?

You can write a style sheet and apply it to txtbox. CssClass = "Your Style ";
In a style, you can set the font size, color, background color, and background image,
Change the style sheet to change the style you need

How to set the font color of a specific row in the aspnet text box

Are you using another solution?
Put a Panel (after the panel is compiled in asp.net, It is a div and will not be displayed as a panel)
Then dynamically Add a label to it (this one is written by myself)
Then, how do you set the label color?
Then you can change some things on your own. It looks like it is similar to what you said.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.