Linking to E-mail through datagrid

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Linking to E-mail through datagrid

 
0
  #1
Apr 21st, 2004
Ok guys, here is what the problem is.

I have a column "reference number", now I want to make a column for "email" and depending what value is in the ref. No cell, the email will change accordingly, here is an example.

If the reference number is "THVP" then I want the email cell on the same row to be zorba@hotmail.com and if the reference number is "SHVP" then I want the email cell on the same row to be slade@hotmail.com can anybody help me out here? Please?

Any help would be tremendously appreciated.
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Linking to E-mail through datagrid

 
0
  #2
Apr 22nd, 2004
hey don't worry about it, I did it myself (I got lazy too), What I did was instead of worrying about that, I worried about the actual e-mail link in the datagrid even working. So I created another column in my database table called "Email" and manually entered the e-mails in according to ref. No. then for the e-mail column in the datagrid I used this code.

  1.  
  2. Inquire/Apply
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Linking to E-mail through datagrid

 
0
  #3
Apr 22nd, 2004
my bad, I used this code

  1.  
  2. <asp:TemplateColumn SortExpression="Email" HeaderText="E-mail">
  3. <HeaderStyle Width="12%"></HeaderStyle>
  4. <ItemTemplate>
  5. <asp:HyperLink id=lnkEmail runat="server" NavigateUrl='<%# "<A href="mailto:"&amp">mailto:"&amp; DataBinder.Eval(Container.DataItem,"Email") %>'>Inquire/Apply</asp:HyperLink>
  6. </ItemTemplate>
  7. </asp:TemplateColumn>
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC