5 Answers, 1 is accepted
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.
Elian
the Telerik team
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?
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;
Elian
the Telerik team
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?