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

  • SEARCH
  • Home
  • 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 8374499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:56:11+00:00 2026-06-09T14:56:11+00:00

I have a page (default.aspx) with a Repeater fetching data from my database, this

  • 0

I have a page (default.aspx) with a Repeater fetching data from my database, this is the layout for the Repeater:

default.aspx:

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Id","~/fullpost.aspx?Id={0}") %>'><asp:Literal ID="LitTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Literal></asp:HyperLink>
                            <br />
                            <span class="textSum">
                                <asp:Literal ID="LitSummary" runat="server" Text='<%# Eval("Summary") %>'></asp:Literal></span>
                            <span class="dateTime">
                                <asp:Literal ID="Literal1" runat="server" Text='<%# Eval("CreateDateTime") %>'></asp:Literal></span>

Notice the hyperlink now, it directs to fullpost.aspx, On this page I want to display only that one item I clicked (the URL is being pointed right, it goes to fullpost.aspx?Id=IdNumber), so I tried the following:

fullpost.aspx:

<asp:Literal ID="Literal1" runat="server" Text='<%# Eval("Title") %>'></asp:Literal>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:orangefreshConnectionString1 %>" 
            SelectCommand="SELECT [Id], [Title], [Summary], [Body], [CreateDateTime] FROM [Post] WHERE ([Id] = @Id)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Id" QueryStringField="Id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

But my literal is not displaying the Title as I want it to, nothing shows up. What exactly am I doing wrong here?


After adding the data bound control:

 <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1">
        <asp:Literal runat="server" Text='<%# Eval("Title") %>'></asp:Literal>
    </asp:FormView>

I’m now getting:
Parser Error Message: Type ‘System.Web.UI.WebControls.FormView’ does not have a public property named ‘Literal’.

  • 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-09T14:56:12+00:00Added an answer on June 9, 2026 at 2:56 pm

    Literal1 on fullpost.aspx is not inside a data bound control to get its data from the SqlDataSource. Put it inside something like a FormView with it’s data source set to SqlDataSource1.

    EDIT example FormView

    The FormView contains a tag called <ItemTemplate> which contains the controls you want to display. NOTE: If you use an IDE like Visual Web Developer, it will automatically create the correct tag structure for you.

    <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <asp:Literal runat="server" Text='<%# Eval("Title") %>' />
        </ItemTemplate>
    </asp:FormView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.Net Page, aspx with its default form. I have a Submit
i have a masterpage which contains loginstatus control <asp:LoginStatus ID=LoginStatus1 runat=server LogoutAction=Redirect LogoutPageUrl=Default.aspx />
I am using asp.net/C# for my project.Currently i have a default.aspx page and a
I have Default.aspx page, which inherits from BasePage.cs, which inherits from System.Web.UI.Page. BasePage is
I am having a default page namely default.aspx in this i will have panel.
I have Default.aspx page, which inherits from BasePage.cs, which inherits from System.Web.UI.Page. BasePage is
I have a page called Default.aspx which inherits from a master page called Main.master.
I have an asp page (Default.aspx) that displays the diff between two text files.
I have a page like this: <%@ Page Title= Language=C# MasterPageFile=~/TekContent.master AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default
I have a web form page Default.aspx, which inherits from a BasePage class that

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.