Last night I wrote a little bit about the label of the CMS system I ordered, and today I wrote the code for the label instead.
My method is very simple, is "replace" the word.
example ①html--binding Data
Copy Code code as follows:
<!--{An:alist filed=[title,time] category=[#] num=[10] page=[true] Sort=[time desc]}-->
<li><span class= "Fr_time" >${2}</span><a href= "$href [articleview][{" id ", #0}]" >${1}</a ></li>
<!--{/an}-->
Note: $href [articleview][{"id", #0}] represented by the address is: your domain/article/view/{id} in the subsequent article I will solve
Release: $href [Articleview] What is this thing? Example ① replacement of ASP.net source code
Copy Code code as follows:
<script runat= "Server" >
protected override void OnLoad (EventArgs e)
{
Myhashtable.add ("Dfe3b56eb5d720382bb90cf468d83c35", Article ("Textfile.id,title,time", 1, 8, "Time Desc", "", "", "));
}
</script>
<%
if (1==1)
{
var myrows = myrows ("Dfe3b56eb5d720382bb90cf468d83c35");
if (myrows!= null)
{
foreach (Var a in myrows)
{%>
<li>
<span class= "Fr_time" ><%=timeformart (a[2), "Yyyy-mm-dd")%></span>
<a href= "<%=urlroute" ("Articleview", new string[,]{{"id", a[0). ToString ()}})%> "><%=a[1]%></a>
</li>
<%}
}
Else
{%>
<p style= ' margin:10px; ' > No relevant information </p>
<%
}
}%>
I'll explain here a little bit .:
Myhashtable.add () This is the equivalent of the list to be fetched, to the dataset DataSet. Example ②html--Paging
page-Effect chart:
Paging labels
Copy Code code as follows:
<!--{An:alistpager category=[#]}-->
$pager [articlelist][{"category", "#category"}][10]
<!--{/an}-->
example ②html--asp.net source code after paging replacement
Copy Code code as follows:
<script runat= "Server" >
protected override void OnLoad (EventArgs e)
{
Myhashtable.add ("386d9595d2fbd4c65f5d1b28baa8fd96", Articlepager ("", "#", ""));
}
</script>
<%
if (1==1)
{
var myrows = myrows ("386d9595d2fbd4c65f5d1b28baa8fd96");
if (myrows!= null)
{
foreach (Var a in myrows)
{%>
<%=paging ("Articlelist", New string[,]{{"category", "#category"}},10,a[0])%>
<%
}
}
Else
{%><p style= ' margin:10px; ' > No relevant information </p><%
}
}%>
All in all, basically the binding data can be used.
Now my CMS to deal with the basic corporate web site, is more than enough, there are members of the function has yet to be developed.
has been a person alone development, technical use of the wrong place also please magnanimous, because personal technology is too superficial, hesitate whether open source.
Afraid of predecessors jokes, hehe, first send a paste to pasted.