C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

I can not understand below item template in data grid.Can i use it in grid view?


Posted Date: 29 Nov 2008      Posted By: Rasmi Ranjan      Member Level: Gold     Points: 1   Responses: 1



Hi all
I can not understand below item template in data grid.Can i use it in grid view?

<asp:TemplateColumn HeaderText="User Id">
<ItemTemplate>
<a href='UserUpdate.aspx?logonID=<%# DataBinder.Eval(Container.DataItem,"User_id")%>'>
<%#DataBinder.Eval(Container.DataItem, "User_Logon")%>
</a>
</ItemTemplate>
<ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
<HeaderStyle Height="20px" HorizontalAlign="Left" />
</asp:TemplateColumn>





Responses

Author: lalitha    29 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

You can use it in Gridview.But some syntatical differences

check this code for Gridview

<asp:TemplateField HeaderText="FirstName" SortExpression="FirstName">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("FirstName") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("FirstName") %>'></asp:Label>
<asp:Label ID="Label2" runat="server"
Text='<%# Bind("LastName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>


Regards
Lalitha



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : how to apply stylesheet to web form?
Previous : Very urgent task in ASP.Net !!!!!!!!!!!!!!!
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use