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 7588727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:59:37+00:00 2026-05-30T19:59:37+00:00

I am developing an intranet web application. I am working now on the User

  • 0

I am developing an intranet web application. I am working now on the User Profile which shows four tables about the employee personal information, training courses, company short quizzes and his submitted ideas and suggestions.

What I want now is if the employee has no suggestions, the message such as ( You don’t have any suggestions) inside the table instead of showing a table with its header without telling the user that he has no suggestions. So how to do that?

My ASP.NET code:

<asp:Repeater ID="Repeater4" runat="server" DataSourceID="SqlDataSource4">
                    <HeaderTemplate>
                        <div>
                        <table border="1">
                            <thead>
                                <tr>
                                    <td colspan="3">
                                        <center> <strong>Safety Suggestions</strong> </center>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <center> <strong>Suggestion Title</strong> </center>
                                    </td>
                                    <td>
                                        <center> <strong>Description</strong> </center>
                                    </td>
                                </tr>
                            </thead>

                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <p>
                                    <%# Eval("Title") %>
                                </p>
                            </td>
                            <td>
                                <p>
                                    <%# Eval("Description") %>
                                </p>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                        </div>
                    </FooterTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:testConnectionString %>" SelectCommand="SELECT     dbo.SafetySuggestionsLog.Title, dbo.SafetySuggestionsLog.Description, dbo.SafetySuggestionsLog.Username
FROM         dbo.SafetySuggestionsLog INNER JOIN
                      dbo.employee ON dbo.SafetySuggestionsLog.Username = dbo.employee.Username
WHERE     (dbo.employee.Username = @Username)">
                    <SelectParameters>
                        <asp:Parameter Name="Username" />
                    </SelectParameters>
                </asp:SqlDataSource>
  • 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-05-30T19:59:38+00:00Added an answer on May 30, 2026 at 7:59 pm

    You can use a footer template to manage massage, like this

    step 1…

    <FooterTemplate>
            <%-- Label used for showing Error Message --%>
            <asp:Label ID="lblErrorMsg" runat="server" Text="Sorry, no item is there to show." Visible="false">
            </asp:Label>
        </FooterTemplate>
    

    step 2…
    handle visibility of lable in Repeater_ItemDataBound event like

    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        Repeater rptDemo = sender as Repeater; // Get the Repeater control object.
    
        // If the Repeater contains no data.
        if (repeaterTopItems != null && repeaterTopItems.Items.Count < 1)
        {
            if (e.Item.ItemType == ListItemType.Footer)
            {
                // Show the Error Label (if no data is present).
                Label lblErrorMsg = e.Item.FindControl("lblErrorMsg") as Label;
                if (lblErrorMsg != null)
                {
                    lblErrorMsg.Visible = true;
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an intranet web application which is a Quiz Engine. Now, I
I am developing an intranet web application which should provide its users with a
I am developing an intranet web application which is a Quiz Engine. I have
I am developing an intranet web application which works as a Suggestions Box. The
I am developing an intranet web application which is a Quiz Engine. The admin
I am developing a small intranet based web application. I have YSlow installed and
I am developing an ASP.NET intranet web application that provides short quizzes to the
I'm currently developing application using DirectSound for communication on an intranet. I've had working
We are developing an intranet web application on .NET 2.0 platform. The application is
I'm developing a kind of web-based intranet application that runs on wamp, other systems/hosts

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.