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. Advertising

  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. Advertising

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. Madhusudan Singh
    Replies:
    2
    Views:
    367
    Ben Caradoc-Davies
    Oct 15, 2005
  2. -Lost

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

    -Lost, Aug 14, 2007, in forum: C Programming
    Replies:
    24
    Views:
    759
    CBFalconer
    Aug 17, 2007
  3. Saraswati lakki
    Replies:
    0
    Views:
    1,350
    Saraswati lakki
    Jan 6, 2012
  4. Mario Antonetti

    print to a label printer directly

    Mario Antonetti, Mar 26, 2010, in forum: Ruby
    Replies:
    1
    Views:
    133
    Charles Oliver Nutter
    Mar 28, 2010
  5. Knut Krueger
    Replies:
    8
    Views:
    280
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page