`
varsoft
  • 浏览: 2435264 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

用asp.net写的论坛程序

阅读更多
作者:未知 请与本人联系

这是一个用asp.net写的论坛程序,虽然简单但可以运行。

这个程序的编程思想其实还是基本延续了asp的方式,如果让那只大鸟儿看见可能要嘘之以鼻。但实际上这种方式对于asp程序向asp.net的快速移植还是有用的。如果你对这种移植不屑那也没办法,这个贴子就算给asp.net刚入门的小虾们开开眼。

这个例子包含3部分

1)forum.aspx-论坛主页。

2)reply.aspx-当在论坛主页中点击一个贴子时调用,显示贴子详细内容。

3)postmessage.aspx-上贴时调用,将内容保存入数据库

数据库结构Table-newpost:ThistablewillcontaintheNewTopicpostedmessages
postid(primarykey)Theuniqueidforeachnewtopic.
nameThenameoftheauthorofthemessage.
emailE-mailaddressoftheauthor.
subjectSubjectofthemessage.
ipIPaddressoftheauthor.
dateDate/TimeofthePost
messageMessageposted.
repliesNumberofrepliestothepost(ifany)
viewsNumberoftimesthemessagehasbeenviewed.


Table-reply:ThistablewillcontaintheRepliesmadetothenewtopics.
replyid(primarykey)Theuniqueidforeachreply.
nameNameoftheauthor.
emailE-mailaddressoftheauthor.
subjectSubjectofthepost
ipIPoftheauthor.
dateDate/Timeofpost.
messageMessageposted.
postidpostidfromthe"newpost"tableforwhichthismessageisareply.


用asp.net写的论坛程序--论坛主页

1)forum.aspx:-Themainforumpage

<%@PageLanguage="C#"Debug="true"%>
<%@AssemblyName="System.Data"%>
<%@ImportNamespace="System.Data.ADO"%>
<%@ImportNamespace="System.Data"%>
<%@ImportNamespace="System"%>
<html><head>
<title>WelcometoMyForum!</title>
<scriptlanguage="C#"runat="server">
//executethisscriptwhenthepageloads
voidPage_Load(ObjectSrc,EventArgsE)
{
//CalltheMethodtoDataBindtheDataGrid
Binding();
}
//ThisMethodConnectstotheDatabase,andDataBindstheDatabasetotheDataGrid
publicvoidBinding()
{
//Stringtoconnecttothedatabase,IfyourDatabaseisinsomeotherdirectorythenchangethepath
//TotheDatabasebelow
stringstrConn=@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource="+Server.MapPath(".\\db\\board.mdb");
//MakeaConnectiontotheDatabase
ADOConnectionmyConn=newADOConnection(strConn);
//StringtoselectrecordsfromtheDatabase.newpostTable
//Ihaveused"ORDERBYpostidDESC"sinceIwanttoshowthelatestpostonthetop
//Ifyouremovethisclausethentheoldestmessagewillbeshownfirst
stringstrCom="SELECTpostid,subject,name,replies,views,dateFROMnewpostORDERBYpostidDESC";
//OpentheConnection,AlwaysremembertoOpentheconnectionbeforedoinganythingelse
myConn.Open();
DataSetmyDataSet=newDataSet();
//CreateaADODataSetCommandandaDataSet
ADODataSetCommandmyCommand=newADODataSetCommand(strCom,myConn);
//FilltheDataSet
myCommand.FillDataSet(myDataSet,"newpost");
//Connectionisclosed
myConn.Close();
//SettheDataViewoftheTable"newpost"containedintheDataSetfortheDataGrid
DataGrid1.DataSource=myDataSet.Tables["newpost"].DefaultView;
//DataBindtheDataGrid
DataGrid1.DataBind();
}
//ThismethodiscalledwhentheDataGridisPaged(i.e.whenyouchangefromPage1toPage2etc..)
publicvoidDataGrid_Updt(Objectsender,DataGridPageChangedEventArgse)
{
//CalltheMethodtoDatabind
Binding();
}
//ThisMethodiscalledwhentheformissubmittedtomakeanewPost
publicvoidSubmit_Click(Objectsender,EventArgse)
{
//proceedonlyifalltherequiredfieldsarefilled-in
if(Page.IsValid&&name.Text!=""&&subject.Text!=""&&email.Text!=""){
//GettheCurrentDateandTime
DateTimenow=DateTime.Now;
errmess.Text="";
//Iambuildingacustomquerywhichwillbeusedtocallthepostmessage.aspxpage.
//SinceitwillbeaquerywehavetoencodethequeryintoUTF8format.
//SoIgetallthefieldsfromtheformandencodethemintoUTF8format
stringreq="name="+System.Web.HttpUtility.UrlEncodeToString(name.Text,System.Text.Encoding.UTF8);
req+="&&email="+System.Web.HttpUtility.UrlEncodeToString(email.Text,System.Text.Encoding.UTF8);
req+="&&subject="+System.Web.HttpUtility.UrlEncodeToString(subject.Text,System.Text.Encoding.UTF8);
//GettheHostAddressoftheAuthor
req+="&&ip="+System.Web.HttpUtility.UrlEncodeToString(Request.UserHostAddress.ToString(),System.Text.Encoding.UTF8);
req+="&&date="+System.Web.HttpUtility.UrlEncodeToString(now.ToString(),System.Text.Encoding.UTF8);
req+="&&message="+System.Web.HttpUtility.UrlEncodeToString(message.Text,System.Text.Encoding.UTF8);
//A'yes'isusedbelowtotellthepostmessagepagethatthisisanewtopicpost
req+="&&newpost="+System.Web.HttpUtility.UrlEncodeToString("yes",System.Text.Encoding.UTF8);
//callthepostmessage.aspxpageandappendthequerytoit.
Page.Navigate("postmessage.aspx?"+req);
}
else
{
errmess.Text="FillinalltheRequiredFieldsbeforePosting!<br>";
}
}
</script>
<LINKhref="mystyle.css"type=text/cssrel=stylesheet></head>
<bodytopmargin="0"leftmargin="0"rightmargin="0"marginwidth="0"marginheight="0">
<!--#IncludeFile="header.inc"-->
<center>
<asp:labelid="errmess"text=""style="COLOR:#ff0000"runat="server"/>
<asp:Labelclass=fodarktext="<fontcolor=#00000>WelcometoMyDiscussionForum</font>"runat=server/>
<br>
<br>
<formmethod="post"runat="server"ID=Form1>
<%--TheDataGridsettings.Itsveryinterestinghowmuchyoucanplaywithit--%>
<asp:DataGridid=DataGrid1runat="server"ForeColor="Black"
PagerStyle-Mode="NumericPages"
OnPageIndexChanged="DataGrid_Updt"PageSize="20"AllowPaging="True"width="80%"autogeneratecolumns="False">
<propertyname="PagerStyle">
<asp:DataGridPagerStyleBackColor="Coral"Mode="NumericPages">
</asp:DataGridPagerStyle>
</property>

<propertyname="AlternatingItemStyle">
<asp:TableItemStyleBorderColor="#FFC080"BackColor="#FF9966">
</asp:TableItemStyle>
</property>

<propertyname="FooterStyle">
<asp:TableItemStyleForeColor="White"BackColor="DarkOrange">
</asp:TableItemStyle>
</property>

<propertyname="ItemStyle">
<asp:TableItemStyleBackColor="Moccasin">
</asp:TableItemStyle>
</property>

<propertyname="HeaderStyle">
<asp:TableItemStyleFont-Bold="True"ForeColor="White"BackColor="Coral">
</asp:TableItemStyle>
</property>
<%--IamsettinguptheIndividualcolumnsmyselfusingTemplates--%>
<propertyname="Columns">
<%--Manipulatethesubjectentrysothatitcontainsalinktothereplypage--%>
<asp:TemplateColumnHeaderText="Subject"itemstyle-width=50%>
<templatename="ItemTemplate">
<asp:Labelrunat="server"Text='<%#"<ahref=reply.aspx?postid="+DataBinder.Eval(Container,"DataItem.postid")+">"
+DataBinder.Eval(Container,"DataItem.subject")+"</a>"%>'ID=Label2></asp:Label>
</template>
</asp:TemplateColumn>

<asp:TemplateColumnHeaderText="AuthorName"itemstyle-width=20%>
<templatename="ItemTemplate">
<asp:Labelrunat="server"Text='<%#DataBinder.Eval(Container,"DataItem.name")%>'ID=Label3></asp:Label>
</template>
</asp:TemplateColumn>


<asp:TemplateColumnHeaderText="Replies"itemstyle-width=10%>
<templatename="ItemTemplate">
<asp:Labelrunat="server"width=10%Text='<%#DataBinder.Eval(Container,"DataItem.replies")%>'ID=Label4>
</asp:Label>
</template>
</asp:TemplateColumn>

<asp:TemplateColumnHeaderText="Views"itemstyle-width=10%>
<templatename="ItemTemplate">
<asp:Labelrunat="server"width=10%Text='<%#DataBinder.Eval(Container,"DataItem.views")%>'ID=Label5>
</asp:Label>
</template>
</asp:TemplateColumn>

<asp:TemplateColumnHeaderText="DateofPost"itemstyle-width=10%>
<templatename="ItemTemplate">
<asp:Labelrunat="server"width=10%Text='
<%#DataBinder.Eval(Container,"DataItem.date").ToString().ToDateTime().ToShortDateString()%>'ID=Label6>
</asp:Label>

</template>
</asp:TemplateColumn>
</property>
</asp:DataGrid>
<br>
<br>
<asp:Labelclass=fodarktext="<fontcolor=#00000>PostNewTopic</font>"runat=server/>
<br>
<tableborder="0"width="80%"align="center">
<tr>
<tdclass="fohead"colspan=2><b>PostNewTopic</b></td>
</tr>
<trclass="folight">
<td>Name:</td>
<td><asp:textboxtext=""id="name"runat="server"/><fontcolor=#ff0000>*</font></td>
</tr>
<trclass="folight">
<td>E-Mail:</td>
<td><asp:textboxtext=""id="email"runat="server"/><fontcolor=#ff0000>*</font></td>
</tr>
<trclass="folight">
<td>Subject:</td>
<td><asp:textboxtest=""id="subject"width=200runat="server"/><fontcolor=#ff0000>*</font>
</td></tr>
<trclass="folight">
<td>Message:</td>
<td>
<asp:TextBoxid=messagerunat="server"
Columns="30"Rows="15"TextMode="MultiLine"></asp:TextBox></td>
</tr>
<trclass=folight>
<tdcolspan=2>
<asp:Buttonclass=fodarkid=writeonClick=Submit_Clickrunat="server"Text="Submit"></asp:Button></td></tr>
</table>
</form>
</center>
<!--#IncludeFile="footer.inc"-->
</body></html>

用asp.net写的论坛程序--浏览贴子内容及回复

2)reply.aspx:Thetopicviewingandreplyingpage

<%@PageLanguage="C#"EnableSessionState="False"Debug="True"%>
<%@ImportNamespace="System"%>
<%@AssemblyName="System.Data"%>
<%@ImportNamespace="System.Data"%>
<%@ImportNamespace="System.Data.ADO"%>
<html><head>
<title>PostNewTopic.</title>
<%--Thesearetheimportedassembliesandnamespacesneeded--%>
<scriptLanguage="C#"runat="server">
DataSetds,rs;
DataRowdr;
stringpostid;
publicvoidPage_Load(objectsender,EventArgse)
{
//CheckifthepageisPostBack
if(!Page.IsPostBack)
{
//GetthepostidfromtheQuerystring
postid=Request.Params["postid"];
if(postid!=null)
{
//Databaseconnectionstring.Changethepathtothedatabasefileifyouhavesomeotherpathwhere
//youaresavingyourDatabasefile
stringstrConn=@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource="+Server.MapPath(".\\db\\board.mdb");
//MakeaconnectiontotheDatabase
ADOConnectionmyConn=newADOConnection(strConn);
//stringtoselecttherecordsfromthenewposttable
stringstrCon="SELECTsubject,name,email,message,dateFROMnewpostWHEREpostid="+postid;
//setaADODataSetCommand
ADODataSetCommandmyCommand=newADODataSetCommand(strCon,myConn);
ds=newDataSet();
//Don'teverforgettoopentheConnection
myConn.Open();
//FilltheDataSet
myCommand.FillDataSet(ds,"newpost");
//GettheRowatposition'0'andstoreitinaDataRowobject
//Whyrowatposition'0'?Sincetherecanonlybeonerecordwiththegivenpostidremember!!
//WhyputintoaDataRow?ItseasytoaccessdatafromaDataRow
dr=ds.Tables["newpost"].Rows[0];
//Getthe"subject"fromtheDataRowandsetitupinthepostreplyform'ssubjectfield
subject.Text="Re:"+dr["subject"].ToString();
//Selecttherepliestothepostfromthereplytable
strCon="SELECTname,email,subject,message,dateFROMreplyWHEREpostid="+postid;
//MakeanewADODataSetCommandandDataSetforthereplytable
ADODataSetCommandmyCommand2=newADODataSetCommand(strCon,myConn);
rs=newDataSet();
//filltheDataSet
myCommand2.FillDataSet(rs,"reply");
//Codetoupdatethe"views"fieldforthenewpostTable
//Selecttheviewsfieldfromthetableforagivenpostid
strCon="SELECTviewsFROMnewpostWHEREpostid="+postid;
//MakeaADOCommandheresincewewantaADODataReaderlater
ADOCommandvicomm=newADOCommand(strCon,myConn);
ADODataReaderreader;
//executethestatementandcreateaADODataReader
vicomm.Execute(outreader);
//ReadtheFirstrecord(therecanonlybeonerecordremember!)
reader.Read();
//Geta"Int32"valuefromthefirstColumn(wehaveonecolumninthereader,checktheselectstatementabove)
inti=reader.GetInt32(0);
//Increasetheviewscount
i++;
reader.Close();
//Updatethenewposttablewiththenewviewsvalue
strCon="UPDATEnewpostSETviews="+i+"WHERE(postid="+postid+")";
//sinceweareusingthesameADOCOmmandobjectforthisstatementtootosettheCommandTextproperty
vicomm.CommandText=strCon;
//Sincethisstatementwillresultinnooutputweuse"ExecuteNonQuery()"method
vicomm.ExecuteNonQuery();
//closetheconnection
myConn.Close();
}
}
}
//Thismethodiscalledwhenthesubmitbuttonisclicked
publicvoidSubmit_Click(Objectsender,EventArgse)
{
//Getthepostid
postid=Request.Params["postid"];

//proceedonlyifalltherequiredfieldsarefilled-in
if(Page.IsValid&&name.Text!=""&&subject.Text!=""&&email.Text!=""){
DateTimenow=DateTime.Now;
errmess.Text="";
//Wehavetocallthepostmessage.aspxpagewithaquerytopostthedatatotheDatabase.
//HencewehavetofirstbuildthecustomqueryfromtheDatapostedbytheuser
//alsosinceweareusingaquerywehavetoencodethedataintoUTF8format
stringreq="name="+System.Web.HttpUtility.UrlEncodeToString(name.Text,System.Text.Encoding.UTF8);
req+="&&email="+System.Web.HttpUtility.UrlEncodeToString(email.Text,System.Text.Encoding.UTF8);
req+="&&subject="+System.Web.HttpUtility.UrlEncodeToString(subject.Text,System.Text.Encoding.UTF8);
req+="&&ip="+System.Web.HttpUtility.UrlEncodeToString(Request.UserHostAddress.ToString(),System.Text.Encoding.UTF8);
req+="&&date="+System.Web.HttpUtility.UrlEncodeToString(now.ToString(),System.Text.Encoding.UTF8);
req+="&&message="+System.Web.HttpUtility.UrlEncodeToString(message.Text,System.Text.Encoding.UTF8);
//Encode"no"toindicatethatthepostisnotanewpostbutitsareplytoaearliermessage
req+="&&newpost="+System.Web.HttpUtility.UrlEncodeToString("no",System.Text.Encoding.UTF8);
req+="&&previd="+System.Web.HttpUtility.UrlEncodeToString(postid,System.Text.Encoding.UTF8);
//Callthepostmessagepagewithourcustomquery
Page.Navigate("postmessage.aspx?"+req);
}
else
{
errmess.Text="FillinalltheRequiredFields!";
}
}
</script>
<LINKhref="mystyle.css"type=text/cssrel=stylesheet></head>
<bodytopmargin="0"leftmargin="0"rightmargin="0"marginwidth="0"marginheight="0">
<%--Includeaheaderfile'header.inc'--%>
<!--#IncludeFile="header.inc"-->
<br>
<divalign=center>
<tableborder=0width=80%cellspacing=2>
<trclass=fohead><thwidth=20%>AuthorName</th>
<thwidth=80%>Message</th></tr>
<%--BelowIamencapsulatingtheemailoftheauthoroverthenameoftheauthor
sothatwhenyouclickontheauthorae-mailgetssenttohim
AlsoIamgetingtheDateTimefromtheDataBaseandDisplayingtheDateandTimeseparately--%>
<trclass=folight><tdrowspan=2align="center"><%="<ahref=mailto:"+dr["email"]+">"+dr["name"]+"</a>"%><br>
<fontsize=1><%=dr["date"].ToString().ToDateTime().ToShortDateString()%><br>
<%=dr["date"].ToString().ToDateTime().ToShortTimeString()%></font>
</td>
<td><b>Subject:</b><%=dr["subject"]%></td></tr>
<trclass=folight>
<td><pre><%=dr["message"]%></pre></td>
</tr>
<%--GetalltherepliestotheOriginalpostandshowthem--%>
<%intno=rs.Tables["reply"].Rows.Count;
if(no>0)
{
for(intj=0;j<no;j++)
{
DataRowrd=rs.Tables["reply"].Rows[j];
%>
<trclass=fodark>
<tdalign="center"><%="<ahref=mailto:"+rd["email"]+">"+rd["name"]+"</a>"%><br>
<fontsize=1><%=rd["date"].ToString().ToDateTime().ToShortDateString()%><br>
<%=rd["date"].ToString().ToDateTime().ToShortTimeString()%></font>
</td>
<td><pre><%=rd["message"]%></pre></td>
</tr>
<%
}
}
%>
</table>
</div>
<h3align="center"class="fodark"><ahref=forum.aspx>ClickHere</a>togotobacktoForum.
<br>ReplytotheAbovePost.</h3>
<br>
<asp:labelid="errmess"text=""style="COLOR:#ff0000"runat="server"/>
<formrunat="server">
<tableborder="0"width="80%"align="center">
<tr>
<tdclass="fohead"colspan=2><b>ReplytothePost</b></td>
</tr>
<trclass="folight">
<td>Name:</td>
<td><asp:textboxtext=""id="name"runat="server"/><fontcolor=#ff0000>*</font></td>
</tr>
<trclass="folight">
<td>E-Mail:</td>
<td><asp:textboxtext=""id="email"runat="server"/><fontcolor=#ff0000>*</font></td>
</tr>
<trclass="folight">
<td>Subject:</td>
<td><asp:textboxtest=""id="subject"width=200runat="server"/><fontcolor=#ff0000>*</font>
</td></tr>
<trclass="folight">
<td>Message:</td>
<td>
<asp:TextBoxid=messagerunat="server"
Columns="30"Rows="15"TextMode="MultiLine"></asp:TextBox></td>
</tr>
<trclass=folight>
<tdcolspan=2>
<asp:Buttonclass=fodarkid=writeonClick=Submit_Clickrunat="server"Text="Submit"></asp:Button></td></tr>
</table>
</form><br>
<br><!--#IncludeFile="footer.inc"-->
</body></html>

用asp.net写的论坛程序--上贴保存

3)postmessage.aspx:-ThepagewhichsaveddatatotheDatabase


<%@ImportNamespace="System"%>
<%@AssemblyName="System.Data"%>
<%@ImportNamespace="System.Data"%>
<%@ImportNamespace="System.Data.ADO"%>
<%@PageLanguage="C#"Debug="true"%>
<html>
<head>
<title>ThankYouforPosting!</title>
<scriptlanguage="C#"runat="server">
//executethisscriptwhenthepageloads
voidPage_Load(ObjectSrc,EventArgsE)
{
//ifthepageiscalledfromanotherpage
if(!Page.IsPostBack){
//GetalltheParametersfromtheQuerystring
stringname=Request.Params["name"];
stringemail=Request.Params["email"];
stringsubject=Request.Params["subject"];
stringip=Request.Params["ip"];
stringdate=Request.Params["date"];
stringmessage=Request.Params["message"];
boolnewmess=true;
stringprevid="1";
//CheckifthepostisaNewtopicorareplytoanewtopic
if(Request.Params["newpost"].Equals("no"))
{
//ifitsareplythengetthepostidcalledasprevidhere
newmess=false;
previd=Request.Params["previd"];
}
//Ifthepostisanewtopicthenfollowthebelowroutine
if(newmess)
{
//Thestringforthepathtothedatabase,ifyourdatabaseisinsomeother
directorytheneditthepath
//ofthisvariable
stringstrConn=@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=
"+Server.MapPath(".\\db\\board.mdb");
//GetaADOConnectiontothedatabase
ADOConnectionmyConn=newADOConnection(strConn);
//TheSQLSelectstatement
stringstrCom="Selectpostidfromnewpost";
//CreateaADOCommandsincewewantaADODataReaderlater
ADOCommandmyCommand=newADOCommand(strCom,myConn);
//Opentheconnection
myConn.Open();
ADODataReaderreader;
//ExecutethecommandandgettheDatainto"reader"
myCommand.Execute(outreader);
inti=1;
//Getthecurrentnumberofrecordspresentinthedatabase.
while(reader.Read())
{
i++;
}
reader.Close();
//buildtheSQLstatementtoinsertintotheDatabase
stringinsertStr="INSERTINTOnewpostVALUES("
+i+",'"
+name+"','"
+email+"','"
+subject+"','"
+ip+"','"
+date+"','"
+message+"',0,0)";
myCommand.CommandText=insertStr;
//SincetheSQLstatementdoesnotreturnanyoutputuse"ExecuteNonQuery()method
myCommand.ExecuteNonQuery();
//Closetheconnection
myConn.Close();
}
else
{
//Iftheposteddataisareplytoatopicthenfollowthebelowprocedure
//stringforthepathtothedatabase,ifyourdatabaseisstoredinsomeotherdirectorythen
//editthepathhere
stringstrConn=@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource="+
Server.MapPath(".\\db\\board.mdb");
ADOConnectionmyConn=newADOConnection(strConn);
//SQLstatementtoselectthereplyid
stringstrCom="Selectreplyidfromreply";
//createaADOCommand
ADOCommandmyCommand=newADOCommand(strCom,myConn);
//OpentheConnection
myConn.Open();
ADODataReaderreader;
//ExecutethecommandandgettheDatainto"reader"
myCommand.Execute(outreader);
inti=1;
//Getthecurrentnumberofrecordspresentinthedatabase.
while(reader.Read())
{
i++;
}
reader.Close();
//Buildastatementtoinsertthevaluesintothereplytable
stringinsertStr="INSERTINTOreplyVALUES("
+i+",'"
+name+"','"
+email+"','"
+subject+"','"
+ip+"','"
+date+"','"
+message+"',"
+previd+")";
myCommand.CommandText=insertStr;
//ExecuteNonQuery-sincethecommanddoesnotreturnanything
myCommand.ExecuteNonQuery();
//stringtogettherepliescolumnfromthenewposttable
stringreplyno="SELECTrepliesFROMnewpostWHEREpostid="+previd;
myCommand.CommandText=replyno;
//Executecommandandgetthereader
myCommand.Execute(outreader);
//readthefirstrecord(remembertherecanonlybeonerecordinthereadersincepostidisunique)
reader.Read();
//Getthe"Int16"valueofthenumberofrepliesfromtherepliescolumninthenewposttable
intrep=reader.GetInt16(0);
reader.Close();
rep++;
//SQLstatementtoupdatetherepliesfieldinthenewposttable
stringupdtStr="UPDATEnewpostSETreplies="+rep
+"WHERE(postid="+previd+")";
myCommand.CommandText=updtStr;
//ExecuteNonQuerrywhy??IguessUshouldknowbynow!
myCommand.ExecuteNonQuery();
myConn.Close();
}
//getthedifferentParametersfromthequerystringandstoreit
//torespectiveLabels
NameLabel.Text=name;
EmailLabel.Text=email;
SubjectLabel.Text=subject;
MessageLabel.Text=message;
}
else
{
//elsedisplayanerror
errmess.Text="ThisPageCannotbecalleddirectly.IthastobecalledfromtheFormpostingpage.<br>";
}
}
</script>
<LINKhref="mystyle.css"type=text/cssrel=stylesheet>
</head>
<bodytopmargin="0"leftmargin="0"rightmargin="0"marginwidth="0"marginheight="0">
<!--#IncludeFile="header.inc"-->
<center>
<asp:labelid="errmess"text=""style="color:#FF0000"runat="server"/>
<h2class="fodark"><b>ThankYou,forpostingontheMessageBoard.</b></h2>
<tablealign=centerwidth="60%"border="0"cellspacing="2"cellpadding="1">
<trclass="fohead"><tdcolspan="2">TheinformationYouPosted!</td></tr>
<trclass="folight">
<td>Name:</td>
<td><asp:labelid="NameLabel"text=""runat="server"/></td>
</tr>
<trclass="folight">
<td>E-Mail:</td>
<td><asp:labelid="EmailLabel"text=""runat="server"/></td>
</tr>
<trclass="folight">
<td>Subject:</td>
<td><asp:labelid="SubjectLabel"text=""runat="server"/></td>
</tr>
<trclass="folight">
<td>Message:</td>
<td><asp:labelid="MessageLabel"text=""runat="server"/></td>
</tr>
</table>
<br>
<h4class="fodark"><ahref="forum.aspx">Clickhere</a>togobacktotheForum.<br>
<%--Alittleworktoshowthelinktoreturnbacktothepageif,thepostwasareply--%>
<%if(Request.Params["previd"]!=null)
{%>
<ahref='reply.aspx?postid=<%=Request.Params["previd"]%>'>Clickhere</a>togoback
whereyoucamefrom.
<%}%>
</h4>
</center>
<!--#IncludeFile="footer.inc"-->
</body>
</html>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics