Is it any point to use html directly instead of label

Discussion in 'ASP .Net' started by Tony Johansson, Nov 29, 2010.

  1. Hello!

    Instead of using a label control I can write the text directly in the web
    page.

    So is it any point to write text directly insted of using a label ?

    //Tony
     
    Tony Johansson, Nov 29, 2010
    #1
    1. Advertisements

  2. Tony Johansson

    Brian Cryer Guest

    "Tony Johansson" <> wrote in message
    news:id0ho0$j04$-september.org...
    > Hello!
    >
    > Instead of using a label control I can write the text directly in the web
    > page.
    >
    > So is it any point to write text directly insted of using a label ?


    If the text never changes then you could use static text in the HTML, but if
    the text does change then with a label:

    1. its considerably easier to use than injecting plain text.

    2. ots probably much easier for someone else (or you) to maintain the code
    if you use a label rather than adding output directly.

    whether or not the text every changes:

    3. You can associate a label with another control, which helps screen
    readers associate the text (caption) with the control it goes with.

    Hope this helps.
    --
    Brian Cryer
    http://www.cryer.co.uk/brian
     
    Brian Cryer, Nov 30, 2010
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter C
    Replies:
    1
    Views:
    732
    Hywel Jenkins
    Oct 6, 2003
  2. Steve Pugh
    Replies:
    2
    Views:
    714
    Peter C
    Oct 6, 2003
  3. Madhusudan Singh
    Replies:
    2
    Views:
    483
    Ben Caradoc-Davies
    Oct 15, 2005
  4. -Lost

    No point in learning C? Use C++ instead?

    -Lost, Aug 14, 2007, in forum: C Programming
    Replies:
    24
    Views:
    1,095
    CBFalconer
    Aug 17, 2007
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,699
    Saraswati lakki
    Jan 6, 2012
  6. Mario Antonetti

    print to a label printer directly

    Mario Antonetti, Mar 26, 2010, in forum: Ruby
    Replies:
    1
    Views:
    216
    Charles Oliver Nutter
    Mar 28, 2010
  7. Knut Krueger
    Replies:
    8
    Views:
    648
    Knut Krueger
    Aug 20, 2013
  8. Sam
    Replies:
    7
    Views:
    269
    Marcel Rodrigues
    Feb 9, 2014
Loading...