|
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<%@ Register TagPrefix="DotNetNews" TagName="FHeader" Src="../controls/front_header.ascx" %>
<%@ Register TagPrefix="DotNetNews" TagName="FFooter" Src="../controls/front_footer.ascx" %>
<%
' ===============================================================================
' WWWeb Concepts ASP Development Solutions www.ebconcepts.com
' This application designed and written by written by James W. Threadgill
' wayne@ebconcepts.com. You must leave copyright notices intact.
' Copyright 2001. All Rights Reserved.
' ===============================================================================
%>
<MM:DataSet
id="DataSet1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_datasource") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_datasource") %>'
CommandText='<%# "SELECT * FROM tbl_New" %>'
CurrentPage='<%# IIf((Request.QueryString("DataSet1_CurrentPage") <> Nothing), Request.QueryString("DataSet1_CurrentPage"), 0) %>'
PageSize="5"
Debug="true"
> </MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<DotNetNews:FHeader ID="FHeader1" runat="server" />
<table width="100%" border="0">
<tr>
<td>
<h1>
<MM:If runat="server" Expression='<%# (DataSet1.RecordCount > 0) %>'>
<ContentsTemplate>Site News</ContentsTemplate>
</MM:If>
<MM:If runat="server" Expression='<%# (DataSet1.RecordCount = 0) %>'>
<ContentsTemplate>No News</ContentsTemplate>
</MM:If>
</h1>
</td>
</tr>
</table>
<ASP:Repeater runat="server" DataSource='<%# DataSet1.DefaultView %>'>
<ItemTemplate>
<table width="100%" border="0">
<tr>
<td> <MM:If runat="server" Expression='<%# (DataSet1.FieldValue("N_image", Container) <> "") %>'>
<ContentsTemplate></ContentsTemplate>
</MM:If> <span class="bold"> <a href="news_details.aspx?N_ID=<%# DataSet1.FieldValue("N_ID", Container) %>">
<%# DataSet1.FieldValue("N_headline", Container) %>
</a> </span> </td>
</tr>
<tr>
<td class="tablesmall"> Posted:
<%# DateTime.Parse(DataSet1.FieldValue("N_Date", Container)).ToString("D") %> </td>
</table>
</ItemTemplate>
</ASP:Repeater>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"> <MM:If runat="server" Expression='<%# (DataSet1.CurrentPage <> 0) %>'>
<ContentsTemplate> <a href="<%# Request.ServerVariables("SCRIPT_NAME") %>?DataSet1_currentPage=0">First</a>
</ContentsTemplate>
</MM:If> </td>
<td width="31%" align="center"> <MM:If runat="server" Expression='<%# (DataSet1.CurrentPage <> 0) %>'>
<ContentsTemplate> <a href="<%# Request.ServerVariables("SCRIPT_NAME") %>?DataSet1_currentPage=<%# DataSet1.CurrentPage - 1 %>">Previous</a>
</ContentsTemplate>
</MM:If> </td>
<td width="23%" align="center"> <MM:If runat="server" Expression='<%# (DataSet1.CurrentPage < DataSet1.LastPage) %>'>
<ContentsTemplate> <a href="<%# Request.ServerVariables("SCRIPT_NAME") %>?DataSet1_currentPage=<%# DataSet1.CurrentPage + 1 %>">Next</a>
</ContentsTemplate>
</MM:If> </td>
<td width="23%" align="center"> <MM:If runat="server" Expression='<%# (DataSet1.CurrentPage < DataSet1.LastPage) %>'>
<ContentsTemplate> <a href="<%# Request.ServerVariables("SCRIPT_NAME") %>?DataSet1_currentPage=<%# DataSet1.LastPage %>">Last</a>
</ContentsTemplate>
</MM:If> </td>
</tr>
</table>
<DotNetNews:FFooter ID="FFooter1" runat="server" />
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
James W. Threadgill began his education with community college computer science certification program. He continued to the University of Houston-Clear Lake where he earned a Bachelor of Science and a Master of Arts. His first paying jobs as a web developer took place were during his first year of graduate school in 1998. He soon established
WWWeb Concepts a web design and development firm located in Houston Texas that he still owns and operates today.
He has authored tutorials on web development for the Microsoft Developer Network Academic Alliance, Code Project and the Dynamic Zones. He co-authored the Glasshaus book Dreamweaver MX: ASP.NET Web Development released by Wrox Press February 2003.
Repository: https://github.com/wwwebconcepts