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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:56:53+00:00 2026-06-12T17:56:53+00:00

I need your help please. I have this xml file which I need to

  • 0

I need your help please.
I have this xml file which I need to read and diplay it a table using a repeater. The header columns of the table should be a button which if clicked should sort the contents of the column.

The data is displayed ok, but the problem is with the sort, when I click one of the buttons the page just posts back a a blank page.

what am I doing wrong? Please correct me.
thanx

this is the code of the aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default2.aspx.cs" Inherits="ex3.Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">


           <asp:Repeater ID="Repeater1" runat="server" 
      >
    <HeaderTemplate>


        <table>
            <tr>

                <th>   <asp:Button ID="btnEvent"  runat="server" Text="event" OnClick="btnEvent_Click" width="100%" EnableViewState="True"  CausesValidation="True" />
                </th>
                <th>   <asp:Button ID="btnDate" runat="server" Text="date" OnClick="btnDate_Click" width="100%" EnableViewState="True"  CausesValidation="True" />
                </th>

            </tr>
    </HeaderTemplate>

    <ItemTemplate>
        <tr>


            <td>
            <asp:Label ID="lbl1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "title") %>'></asp:Label>
            </td>
            <td>
                <asp:Label ID="lbl2" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "pubDate") %>'></asp:Label>
            </td>


            </tr>
           </ItemTemplate>



    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater>

    </form>
</body>
</html>

the code of the c#:

 public partial class Default2 : System.Web.UI.Page
    {
        DataSet ds;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ds = new DataSet();
                ds.ReadXml(@"http://www1.biu.ac.il/rss-event-eng.php");
                Repeater1.DataSource = ds;
                Repeater1.DataMember = ds.Tables[2].TableName;
                Repeater1.DataBind();
                form1.Controls.Add(Repeater1);
            }
        }
        protected void btnEvent_Click(object sender, EventArgs e)
        {

            DataSet ds = new DataSet();
            ds.ReadXml(@"http://www1.biu.ac.il/rss-event-eng.php");
            DataView dv = ds.Tables[2].DefaultView;
            dv.Sort = "title ASC";
            Repeater1.DataSource = dv;
            Repeater1.DataBind();


        }


        protected void btnDate_Click(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();
            ds.ReadXml(@"http://www1.biu.ac.il/rss-event-eng.php");
            DataView dv = ds.Tables[2].DefaultView;
            dv.Sort = "pubDate ASC";
            Repeater1.DataSource = dv;
            Repeater1.DataBind();


        }
    }
  • 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-12T17:56:54+00:00Added an answer on June 12, 2026 at 5:56 pm

    Delete this string in Page_Load

    form1.Controls.Add(Repeater1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to this ExpandableListView and I desperately need your help please. I'm using
Please I need your help with grabbing rows from a table and dynamic text
please I need your help with a Linq expression: I have nested objects with
Please, I need your help. I have a Follow button. When the button is
i need again your help... I have this php code: <? if(isset($_POST['addnews'])){ $type =
I am new to Rails and I need your help. I have this: #
please i need your help with an issue. I have two forms on my
I need again your help please!! I've an android application that write/read files to/from
Please I need your help with my script. I'm trying to insert values into
Please i need your help with how to include INDEXES in my tables, i've

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.