label with address format

  • Follow


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
0
Reply Utf 6/28/2010 2:29:06 AM

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.
0
Reply Mr 6/28/2010 3:42:52 AM


1 Replies
293 Views

(page loaded in 0.035 seconds)

Similiar Articles:
















7/18/2012 8:32:13 PM


Reply: