SoFunction
Updated on 2025-04-13

Generate static pages and paginate +ubb page 2/2



Copy the codeThe code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" validateRequest="false" CodeFile="" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:///TR/xhtml1/DTD/">

<html xmlns="http:///1999/xhtml" >
<head runat="server">
<title>Generate static pages and paginate</title>
<style type="text/css">
*{
font-size:12px;
}
#menu{
padding:0;
margin:0;
}
#menu li{
list-style-type:none;
float:left;
margin-right:10px;
}
.myTable,.myTable td{
border:1px solid #cccccc;
border-collapse:collapse;
}
</style>
<script language="javascript" type="text/javascript">
//The js code part comes from "WuShuang" netizens
function AddText(NewCode){
setfocus();
var edit = ();
if(edit){
if( > 0){
+= NewCode;
}else{
= NewCode;
}
();
}
}

function setfocus(){
getinput().focus();
}

function getinput(){
return ("tbxContent");
}

function code(){
addText = "\r[ code]\r
";
AddText(addText);
}

function html(){
addText = "\r

[Ctrl+A Select all Note:Introducing external Js requires refreshing the page before execution]
";
AddText(addText);
}

function page(){
addText = "[ page]";
AddText(addText);
}
function runCode(cod1){cod=(cod1);var codcode=;if(code!=""){var newwin=('','','');=null;(code);();}}
function copyCode(obj){var temp=(obj);if(){var rng=();(temp);();();("Copy");(false);}else
{("This function is only valid on IE");}}
function saveCode(obj){var winname=('','_blank','top=10000');('text/html','replace');();('saveas','','');();}
</script>
</head>
<body>
<form runat="server">
<div>
<table class="myTable">
<tr>
<td>Title:</td>
<td style="width: 478px"><asp:TextBox ID="tbxTitle" runat="server" Width="277px"></asp:TextBox></td>
</tr>
<tr>
<td style="height: 347px">Content:</td>
<td style="width: 478px; height: 347px">
<ul >
<li><a href="javascript:page()">[Insert Pagination]</a></li>
<li><a href="javascript:code()">[Insert Code]</a></li>
<li><a href="javascript:html()">[Insert runnable code]</a></li>
</ul>
<asp:TextBox ID="tbxContent" runat="server" Height="296px" TextMode="MultiLine" Width="469px"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="btnOk" runat="server" Text="generate static pages and paginate" OnClick="btnOk_Click" />
</td>
</tr>
</table>

</div>
<asp:Label ID="lbl" runat="server" Text="Label"></asp:Label>
</form>
</body>
</html>
[/code]

Copy the codeThe code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:///TR/xhtml1/DTD/">
<html xmlns="http:///1999/xhtml" >
<head>
<title>$title$</title>
<script language="javascript" type="text/javascript">
function runCode(cod1){cod=(cod1);var codcode=;if(code!=""){var newwin=('','','');=null;(code);();}}
function copycode(obj){var temp=(obj);if(){var rng=();(temp);();();("Copy");(false);}else
{("This function is only valid on IE");}}
//High the current page
= function(){
var pagelist = ("pagelist").getElementsByTagName("a");
for(var i = 0;i < ;i++){
var links = pagelist[i].getAttribute("href");
var myURL = ;
if((links) != -1){
pagelist[i].className = "D";
}
}
}
</script>
<style type="text/css">
body{
text-align:center;
}
h1{
width:100%;
text-align:center;
}
#board{
width:500px;
text-align:left;
}
a{
font-size:12px;
}
:link,:visited{
color:red;
}
</style>
</head>
<body>
<div >
<h1>$title$</h1>
$content$
<div >$pagelist$</div>
</div>

<br />

</body>
</html>

Package and downloadhttp://xiazai./200810/yuanma/asp.net_page.rar
Previous page12Read the full text