Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Button text in two lines [modified]

Button text in two lines [modified]

Scheduled Pinned Locked Moved ASP.NET
csharptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    swissmiss86
    wrote on last edited by
    #1

    How to get the text displayed in two lines for an asp:Button control using C#.Net. for example : so "Find an Existing" should be in first line and "product ID" should display in second line -- modified at 16:02 Thursday 28th September, 2006

    M A 2 Replies Last reply
    0
    • S swissmiss86

      How to get the text displayed in two lines for an asp:Button control using C#.Net. for example : so "Find an Existing" should be in first line and "product ID" should display in second line -- modified at 16:02 Thursday 28th September, 2006

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      I'm afraid you cannot as the button server control normally renders to an input element (either submit or button type) that bascially cannot contain more than one line. So your chance is the button[^] element or rethink about your UI, for example consider an Image button or Link button instead that may do what you need.

      1 Reply Last reply
      0
      • S swissmiss86

        How to get the text displayed in two lines for an asp:Button control using C#.Net. for example : so "Find an Existing" should be in first line and "product ID" should display in second line -- modified at 16:02 Thursday 28th September, 2006

        A Offline
        A Offline
        amaneet
        wrote on last edited by
        #3

        Try this swissmiss86 button1.text="Swiss" + System.Environment.Newline + "Miss" + System.Environment.Newline + "86" :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups