Split Method and NewLine

Hello Guys,

I am attaching screenshot of my message box. Basically, I am trying to display name, email, address in newline (from fakenamegenerator.com) and also I want to trim unwanted space after the email address along with the line " This is real email address. Click here to activate" . Please help me out if you have any solution.
image

Hi @Shruti_Shree,

Great…!

Kindly correct me if i understood your query wrongly. I take it as two scenarios like

  1. You want to remove the empty space after email address
  2. You want to remove the empty space between email address and the line " This is real email address. Click here to activate", as you mentioned.

Let’s sort this out one by one,

  1. So for the first case, its very easy. In messagebox when you type the variable(Say MailId) that stores the mail id, type it as MailId.ToString.Trim
    This would trim the empty space at the end.

  2. For second case, If you are concatenating mailid variable and the statement " This is real email address. Click here to activate", you can do the same as in first case like
    MailId.ToString.Trim + " This is real email address. Click here to activate"

or
even with newline
MailId.ToString.Trim + vbcrlf + " This is real email address. Click here to activate"
or
MailId.ToString.Trim + vbnewline + " This is real email address. Click here to activate"
or
MailId.ToString.Trim + Environment.Newline + " This is real email address. Click here to activate"

Hope this would help you.
Kindly revert back if there is any queries.

Cheers…! Keep going buddy…!

1 Like

Thanks buddy!

1 Like

@Shruti_Shree
Buddy
Kindly close this with solution if u feel it works…which would help others while searching for solution
cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.