This is a migrated thread and some comments may be shown as answers.

Open Outlook or use mailTo

5 Answers 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kriztine
Top achievements
Rank 1
Kriztine asked on 04 Mar 2012, 04:55 PM
Hi,

The data in my report consists of e-mail addresses. If I click on the e-mail address, I want to open outlook containing that address. How to achieve that using HtmlTextBox or TextBox?

5 Answers, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 06 Mar 2012, 04:13 PM
Hello Mae,

You can use the Navigate To Url Action of any component to make them open links. Then you can simply create a mailto link.

An alternative would be to use HtmlTextBox specifically and assign a link to its value. 

All the best,
Elian
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Kriztine
Top achievements
Rank 1
answered on 06 Mar 2012, 04:28 PM

Hello,

I have tried using this,

textBoxTable.Value = "=Fields." + dc.ColumnName;
textBoxTable.Value = "<a href=\"mailto:" + textBoxTable.Value + "\">\n" + textBoxTable.Value + "</a>";


where textBoxTable is a HtmlTextBox


but I am not getting the e-mail addresses (data) but the =Fields.<DataColumnName>

What have I missed?

 

 

 

0
Accepted
Elian
Telerik team
answered on 08 Mar 2012, 02:43 PM
Hi Mae,

The TextBox cannot handle links automatically. You have to use Navigate To Url Action. And then in the action you specify the address. The Value is what displays on the screen, not what happens when you click it. Also when writing data-binding expression the equal sign '=' must be first " so that it specifies that an expression follows. 'some_string' +  =Fields.FieldName" is not valid, it should be "= 'some_string' + Fields.FieldName". Here's a sample for your case:

var action = new NavigateToUrlAction();
action.Target = UrlTarget.NewWindow;
action.Url = "= 'mailto:' + Fields." + dc.ColumnName;
 
textBox1.Action = action;
textBox1.Value = "= Fields." + dc.ColumnName;
Kind regards,
Elian
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Kriztine
Top achievements
Rank 1
answered on 08 Mar 2012, 02:57 PM
Thanks Elian! It works perfectly!
0
Senthil
Top achievements
Rank 1
answered on 14 May 2013, 04:50 AM
How to open Outlook With Attachment in  Rendered PDF File in Web Application ? 
The Rendered PDF Saved in Server Machine .I Cannot View the Attachments in Client Machine? How Save the PDF in Client Machine Without Showing open/Save Dialog?
Tags
General Discussions
Asked by
Kriztine
Top achievements
Rank 1
Answers by
Elian
Telerik team
Kriztine
Top achievements
Rank 1
Senthil
Top achievements
Rank 1
Share this question
or