Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8077695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:33:01+00:00 2026-06-05T15:33:01+00:00

my line in gridview <asp:Label ID=Label2 runat=server Text='<%# new System.Text.StringBuilder(<a href=\/Administration/Pages/EditPage/?pageID=).Append(Eval(PageID)).Append(\>).Append(Eval(Name)).Append(</a>).ToString() %>’></asp:Label> fails with

  • 0

my line in gridview

<asp:Label ID="Label2" runat="server" Text='<%# new System.Text.StringBuilder("<a href=\"/Administration/Pages/EditPage/?pageID=").Append(Eval("PageID")).Append("\">").Append(Eval("Name")).Append("</a>").ToString() %>'></asp:Label>

fails with

Exception Details: System.Web.HttpException: DataBinding:
‘System.Data.DataRowView’ does not contain a property with the name
‘PageID’.

i suspect the issue is the alias in datasource

SelectCommand="SELECT Menus.ID, Menus.ParentID, Menus.Name, Menus.Slug, Menus.PageTitle, Menus.PageSubTitle, Menus.MenuOrder, Menus.IsHomePage, Menus.IsYourAccountLink, Menus.IsMiniMenu, Menus.IsFooterMenu, Menus.IsHeaderMenu, Menus.CustomerID, Customers.SubDomain, PublicPages.ID AS PageID FROM Menus INNER JOIN Customers ON Menus.CustomerID = Customers.ID INNER JOIN PublicPages ON Menus.ID = PublicPages.HeaderMenuID AND Customers.ID = PublicPages.CustomerID WHERE (Menus.CustomerID = @CustomerFilter)"

so how to use it as the alias in:

Append(Eval("PageID"))

thnx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:33:03+00:00Added an answer on June 5, 2026 at 3:33 pm

    Try this one,

    <%# Container.DataItem.GetColumn("PageId")%>
    

    UPDATE1: A second option

    <%#DataBinder.Eval(Container.DataItem.GetColumn("PageId"))%> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code <asp:GridView ID=gvCentersList runat=server AutoGenerateColumns=False DataKeyNames=CenterID DataSourceID=SqlDataSource1 CssClass=gv-classic> <Columns> <asp:TemplateField HeaderText=>
<asp:GridView runat=server id=GrdVw_Download> <RowStyle cssclass=ItemStyle /> <HeaderStyle cssclass=tableheader horizontalalign=Left /> <AlternatingRowStyle cssclass=AlternateItemStyle horizontalalign=Left />
I placed a GridView inside an update panel. <asp:UpdatePanel ID=UpdatePanel4 UpdateMode=Conditional ChildrenAsTriggers=true runat=server> <asp:GridView
I have the next code: <asp:gridview id=GridView1 runat=server cellpadding=6 gridlines=None bordercolor=#336699 borderstyle=Solid borderwidth=1px> <headerstyle
ASP.Net: <asp:GridView id =sampleGridView AutoGenerateEditButton =True OnRowEditing =sampleGridView_RowEditing OnRowCancelingEdit =sampleGridView_RowCancelingEdit OnRowUpdating =sampleGridView_RowUpdating runat =server></asp:GridView>
I'm pretty new to this. I have an ASP gridview control so that in
I have a gridview in asp.net using vb 2005. on Protected Overrides Sub Rendersome
I wrote a method that deletes rows from my an asp.net Gridview when the
I have a gridview with a template field that has a HyperLink: <asp:TemplateField ItemStyle-Width=12%
Say I have a label inside a gridview template column and I assign the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.