User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,908 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,510 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 5463 | Replies: 2
Reply
Join Date: Mar 2004
Location: Brisbane
Posts: 630
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Linking to E-mail through datagrid

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2004
Location: Brisbane
Posts: 630
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Linking to E-mail through datagrid

  #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.

 
 Inquire/Apply 
 
Formerly known as Slade.
Reply With Quote  
Join Date: Mar 2004
Location: Brisbane
Posts: 630
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Linking to E-mail through datagrid

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

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

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 9:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC