Asp.net sample webpage for news and event

Here is a sample ASP.NET webpage for news and events:

News and Events Page

ASPX Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsAndEvents.aspx.cs" Inherits="NewsAndEvents" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>News and Events</title>
    <style>
       .news-item {
            border-bottom: 1px solid #ccc;
            padding: 10px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <h1>News and Events</h1>
            <asp:Repeater ID="newsRepeater" runat="server">
                <ItemTemplate>
                    <div class="news-item">
                        <h2><%# Eval("Title") %></h2>
                        <p><%# Eval("Description") %></p>
                        <p><%# Eval("Date") %></p>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
    </form>
</body>
</html>

Code-Behind (C#):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class NewsAndEvents : Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // Load news data from database or other source
        List<NewsItem> newsItems = GetNewsItems();

        // Bind data to repeater
        newsRepeater.DataSource = newsItems;
        newsRepeater.DataBind();
    }

    private List<NewsItem> GetNewsItems()
    {
        // Replace with your own data retrieval logic
        List<NewsItem> newsItems = new List<NewsItem>();
        newsItems.Add(new NewsItem { Title = "News Item 1", Description = "This is the description of news item 1", Date = DateTime.Now });
        newsItems.Add(new NewsItem { Title = "News Item 2", Description = "This is the description of news item 2", Date = DateTime.Now.AddDays(1) });
        newsItems.Add(new NewsItem { Title = "News Item 3", Description = "This is the description of news item 3", Date = DateTime.Now.AddDays(2) });
        return newsItems;
    }

    public class NewsItem
    {
        public string Title { get; set; }
        public string Description { get; set; }
        public DateTime Date { get; set; }
    }
}

Explanation:

Note: This is a very basic example, and you will likely want to add more features, such as pagination, filtering, and sorting, to your news and events page. Additionally, you will need to replace the GetNewsItems() method with your own data retrieval logic.