programmtically set textbox font-size

Results 1 to 2 of 2

Thread: programmtically set textbox font-size

  1. #1
    Join Date
    Dec 1969

    Default programmtically set textbox font-size

    I have an ASP.NET in which I am using a placeholder web control to dynamically/programmatically add literal, textbox, and radio web controls to a web form in page_onload(). I have figured out how to set the size and width of the textbox, but I am having difficulty programmatically setting the font-size. I have searched examples using the Style objects (and ApplyStyle()), but have not found a relevant example. What line(s) of code will programmatically set the font-size of a dynamically added textbox web control in ASP.NET? -jkj

  2. #2
    Join Date
    Dec 1969

    Default RE: programmtically set textbox font-size

    You could try this:<BR>Dim TxtTest as System.Web.UI.WebControls.TextBox<BR><BR>TxtTest.F ont.Name = "Verdana"<BR>TxtTest.Font.Size = System.Web.UI.WebControls.FontUnit.Point(9)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts