|
 |
aspx thread: Using "Mailto:" in a Repeater
Message #1 by "Ron Mitchell" <ron@b...> on Sun, 14 Jul 2002 23:00:14
|
|
I have data coming from an SQL DB - Full_Name, Email, and Website.
Retrieving the data is no problem as well as displaying the data.
However, I want to format the data (in a table), so a user can click on
Email and be able to send a message or Website and go to that website.
All of the examples I have been able to locate like NavigateURL, show one
having to go to another page...not what I want to do...Ideas are most
welcomed!
Thanks.
Ron
Message #2 by Scott Mitchell <mitchell@4...> on Sun, 14 Jul 2002 16:34:47 -0700
|
|
Use something like:
<asp:Repeater runat="server" id="listEmails">
<ItemTemplate>
<a href="mailto:<%# DataBinder.Eval(Container.DataItem, "Email")
%>">
Email <%# DataBinder.Eval(Container.DataItem, "Full_Name") %>
</a><br />
</ItemTemplate>
</asp:Repeater>
in your code, simply DataBind the appropriate database results to
listEmails.DataSource.
Happy Programming!
Scott Mitchell
mitchell@4...
http://www.4GuysFromRolla.com/
http://www.ASPMessageboard.com/
http://www.ASPFAQs.com/
* When you think ASP, think 4GuysFromRolla.com!
| -----Original Message-----
| From: Ron Mitchell [mailto:ron@b...]
| Sent: Sunday, July 14, 2002 4:00 PM
| To: ASP+
| Subject: [aspx] Using "Mailto:" in a Repeater
|
|
| I have data coming from an SQL DB - Full_Name, Email, and Website.
| Retrieving the data is no problem as well as displaying the data.
| However, I want to format the data (in a table), so a user
| can click on
| Email and be able to send a message or Website and go to
| that website.
| All of the examples I have been able to locate like
| NavigateURL, show one
| having to go to another page...not what I want to
| do...Ideas are most
| welcomed!
| Thanks.
| Ron
|
|
 |