label with address format

Discussion in 'ASP .Net' started by JohnE, Jun 28, 2010.

  1. JohnE

    JohnE Guest

    I have a label in a formview and when it fills with data from the db it
    should be in the format of an address. As in;

    Name
    address
    city, state, zipcode
    phone

    You can see what I am getting at. Currently the info goes in and just
    wraps. How do I go about getting the proper format? Would it be better to
    use a textbox for this? How would the address structure be done for txtbox?

    Thanks
    John
     
    JohnE, Jun 28, 2010
    #1
    1. Advertising

  2. JohnE

    Mr. Arnold Guest

    JohnE wrote:
    > I have a label in a formview and when it fills with data from the db it
    > should be in the format of an address. As in;
    >
    > Name
    > address
    > city, state, zipcode
    > phone
    >
    > You can see what I am getting at. Currently the info goes in and just
    > wraps. How do I go about getting the proper format? Would it be better to
    > use a textbox for this? How would the address structure be done for txtbox?
    >
    > Thanks
    > John


    You can use a multiple line textbox I think. You would use a string
    variable and take each piece of information above, concatenate it into
    the string variable. You would at the end of each word concatenated into
    the string variable, you can concatenate a CRLF (Carriage Return Line
    Feed) at the end of the word so that it does a CRLF in the multiline
    textbox after each line of words. It should work, when you take the
    string varable and set the Textbox.Text with it.

    You can disable the Keypress Event for the HTML textbox so that the user
    cannot enter data in the textbox or set the textbox Enable/Disable
    property to 'Disable' after the textbox has been loaded.

    You can do that or use a Listbox control loading each line of string
    data into the Listbox collection, ignoring any line selection by the
    user in the Listbox.

    Myself, I would look into the Listbox control.
     
    Mr. Arnold, Jun 28, 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. Shapper
    Replies:
    2
    Views:
    748
    Scott Mitchell [MVP]
    May 7, 2005
  2. Josef K.

    <label><div></div></label> allowed?

    Josef K., May 20, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    13,490
    Josef K.
    May 22, 2005
  3. Praveen
    Replies:
    1
    Views:
    996
    Rob Williscroft
    Nov 5, 2006
  4. CSharpner
    Replies:
    0
    Views:
    1,063
    CSharpner
    Apr 9, 2007
  5. Knut Krueger
    Replies:
    8
    Views:
    282
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page