From: JohnE on
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
From: Mr. Arnold on
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.