Wrapping a Hyperlink

U

Uriah Piddle

Hi Gang,

in VS 2005, I have an Asp:Hyperlink in a GridView TemplateField. I am trying
to figure out how to make the text of the hyperlink wrap to the next line if
it is too long. Setting the Width prop of the hyperlink or the Wrap prop of
either the GridView itself or the ItemTemplate does not work. Thanks for any
ideas.

Steve
 
L

Larry Bud

Hi Gang,

in VS 2005, I have an Asp:Hyperlink in a GridView TemplateField. I am trying
to figure out how to make the text of the hyperlink wrap to the next line if
it is too long. Setting the Width prop of the hyperlink or the Wrap prop of
either the GridView itself or the ItemTemplate does not work. Thanks for any
ideas.

Set the width of the column the hyperlink is located in to a fixed
amount. However, if you're displaying a full hyperlink instead of
just a name (i.e. "Click here"), it may not wrap depending on the
content. There are only certain characters that will throw a wrap,
such a space.
 
G

Guest

Thanks Larry. I was testing with a long string with no spaces.

you might also decide to "cut" the long url using regex

For example, show only first 50 characters:

..{1,50}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top