user2710511
user2710511

Reputation: 59

Add link that contains space into email body

I am working on a project. Can any body tell me how can we add hyperlink that contains space in it into a mail body through c# script. I have tried the method as shown below

<file:\\networkshare\February Expense Report.xls>

But in the output i even get this <>. I just want the path .Please help me out. I am using ssis script task. Thanks in advance.

Upvotes: 0

Views: 3138

Answers (2)

user2710511
user2710511

Reputation: 59

Since i was using SSIS send mail task i was not allowed to add html tag inside it. Finally i found answer:) I just replaced space with %20. file:\networkshare\February%20Expense%20Report.xls

Upvotes: 1

Steve B
Steve B

Reputation: 37700

Is your email body HTML?

If yes, a link should be written as <a href="file://networkshare/February%20Expense Report.xls">February Expense Report</a>

  1. An html link should use the <a> tag
  2. Spaces in url can be url encoded using %20

Upvotes: 0

Related Questions