Home
About
Contact
Categories
Classic ASP (28 - Sub-Categories)
CSS (1 - Sub-Category)
JavaScript (4 - Sub-Categories)
Databases (22 - Sub-Categories)
ASP.NET (23 - Sub-Categories)
Delphi (5 - Sub-Categories)
Windows Server Core (3 - Sub-Categories)
VMWare (1 - Sub-Category)
Code Editing Tools (2 - Sub-Categories)
Linux (2 - Sub-Categories)
Dell Servers (15 - Sub-Categories)
Bug Reports
(Bugs Fixed
New CFFCS Coding Source is still in Beta
Please report any errors to the [Contact] page. Thank you.
Classic ASP (28)
CSS (1)
JavaScript (4)
Databases (22)
ASP.NET (23)
Delphi (5)
Windows Server Core (3)
VMWare (1)
Code Editing Tools (2)
Linux (2)
Dell Servers (15)
Resources
[View The Source Code For This Project]
Format SQL Script
ASP.NET
C#
Create an XML Sitemap or data feed with ASP.NET using C#
HTML
Nothing to see here. Choose the [SQL] and [ASP.NET] tab.
SQL
XMLSitemap
-- Create a new database called [Virtual-Class-01] in SQL Server. -- Right-click and choose [New Query] -- Copy and paste the code below and hit [Execute] USE [Virtual-Class-01] GO /****** Object: Table [dbo].[XMLSitemap] Script Date: 7/8/2022 5:17:13 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[XMLSitemap]( [XMLID] [int] IDENTITY(1,1) NOT NULL, [XMLTitle] [nvarchar](50) NOT NULL, [XMLTime] [datetime] NULL, CONSTRAINT [PK_XML] PRIMARY KEY CLUSTERED ( [XMLID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO SET IDENTITY_INSERT [dbo].[XMLSitemap] ON GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (1, N'One', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (2, N'Two', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (3, N'Three', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (4, N'Four', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (5, N'Five', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (6, N'Six', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (7, N'Seven', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO INSERT [dbo].[XMLSitemap] ([XMLID], [XMLTitle], [XMLTime]) VALUES (8, N'Eight', CAST(N'2022-07-08T17:16:57.743' AS DateTime)) GO SET IDENTITY_INSERT [dbo].[XMLSitemap] OFF GO ALTER TABLE [dbo].[XMLSitemap] ADD CONSTRAINT [DF_XMLSitemap_XMLTime] DEFAULT (getdate()) FOR [XMLTime] GO
ASP.NET
Sitemap.aspx
web.config
database.config
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Load.aspx.cs" Inherits="Load" %> <%@ Import Namespace="System.Data" %> <%@ Import NameSpace="System.Data.SqlClient" %>
<% { SqlConnection myConnection; SqlCommand myCommand; SqlDataReader myDataReader; myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Virtual-Learning"].ConnectionString); myConnection.Open(); myCommand = new SqlCommand("select XMLID, XMLTitle, XMLTime from XMLSitemap", myConnection); myDataReader = myCommand.ExecuteReader(); while (myDataReader.Read()) {%>
<%=(string)myDataReader["XMLTitle"]%>
<%=(DateTime)myDataReader["XMLTime"]%>
always
<% } myDataReader.Close(); myConnection.Close(); } %>
Preview
Tags
XML code with XMP tags,ASP.NET with C# and XML
XML code with XMP tags
ASP.NET with C# and XML
ASP.NET with C#asp.net sitemapsitemap asp.netC# sitemapsitemap C#