943,605 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 8100
  • ASP.NET RSS
Apr 21st, 2004
0

Linking to E-mail through datagrid

Expand Post »
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.
Similar Threads
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
Apr 22nd, 2004
0

Re: Linking to E-mail through datagrid

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.

ASP.NET Syntax (Toggle Plain Text)
  1.  
  2. Inquire/Apply
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
Apr 22nd, 2004
0

Re: Linking to E-mail through datagrid

my bad, I used this code

ASP.NET Syntax (Toggle Plain Text)
  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>
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Identification of Web Forms
Next Thread in ASP.NET Forum Timeline: Newbie Needs Help with this ASPX





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC