0

I have linklabel which has spaces at the end, I want to copy the label's content without the spaces.

This copies the linklbl with spaces at the end:

Clipboard.SetText(E_mailLinkLabel.Text)

But couldn't figure out how to trim the linklabel before copying it.

1
Contributor
1
Reply
6
Views
2 Years
Discussion Span
Last Post by Start4me
0

I was able to figure this out.
Here is the code in case anyone will need this in the future:

'Declares a new variable - string
Dim Email As String
'Assigns the new variable to the text of the exsisting label
Email = E_mailLinkLabel.Text
'Trims the string for spaces
Email = Email.Trim
'Copies the text to clipboard without spaces
Clipboard.SetText(Email.ToString)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.