Results 1 to 4 of 4

Thread: what the hell? is it a bug? can't put "<" in lable

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    what the hell? is it a bug? can't put "<" in lable

    try setting the text of a lable to something like this "<previous"

    the lable will resize to 0x0 dunno why. It only happens if "<" is the first character of the text and if there are no spaces after it. At least it happens to me in this one project. What's up with that?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try changing it to this:
    Code:
    &lt;previous
    You have to remember that the < and > characters are html characters. They cause errors.

    If you ever have problems, you can use my simple tool to convert regular text to html encoded text easily:
    http://www.variantx.com/Main/DevTools/HTMLEncoder.aspx

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    umm well yes I thought of that, but, thinking it over, I thought that it shouldn't happen to a lable control since it's not one of those HTML controls. It works fine without the space though, hehe.. thanks, I'll use that &lt; instead
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    No label is different. It is the literal control you want if you want to keep intact html specific characters so that they are viewed on the page render itself.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

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



Click Here to Expand Forum to Full Width