Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2006, 12:26 PM
Authorized User
 
Join Date: Apr 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pulling records from the database

Hi, I have another problem.
In my database I have a field Firstname and Lastname.Now In my datagrid I have to merge both the firstname and the lastname together with a space in between and it will be called as Fullname.Moreover the list of name will be linked to their email address.
Pls help

 
Old April 14th, 2006, 10:21 PM
Authorized User
 
Join Date: Apr 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
                                                                VB
                                                                <asp:TemplateColumn HeaderText="FullName">
                                                                     <ItemTemplate>            
                                                                        <a href='<%#"mailto:"+Container.DataItem("email")%>'>
                                                                        <%# Container.DataItem("firstname")%><%# Container.DataItem("lastname")%>                        
                                                                        </a>
                                                                    </ItemTemplate>
                                                              </asp:TemplateColumn>  
                                                               C#
                                                                <asp:TemplateColumn HeaderText="FullName">
                                                                     <ItemTemplate>            
                                                                        <a href='<%#"mailto:"+DataBinder.Eval(Container.DataItem,"email")%>'>
                                                                        <%# DataBinder.Eval(Container.DataItem,"firstname")%><%# DataBinder.Eval(Container.DataItem,"lastname")%>               
                                                                        </a>
                                                                    </ItemTemplate>
                                                              </asp:TemplateColumn>
 
Old April 17th, 2006, 09:03 AM
Authorized User
 
Join Date: Apr 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you so much. You are great.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling Records from Friday istcomnet ASP.NET 1.0 and 1.1 Basics 6 July 18th, 2008 04:18 PM
Date query pulling records from yesterday Justine Access 5 June 27th, 2004 03:45 PM
arranging records from database moushumi Classic ASP Databases 2 June 5th, 2004 12:56 AM
Pulling individual checkbox requests into database webasp1 Classic ASP Databases 0 February 16th, 2004 08:02 PM
Dynamically pulling table names from a database conundrum Access ASP 2 December 21st, 2003 07:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.