项目:ColorDBTools.csproj中包含文件为:
clsExecuteDB.cs//数据操作
using System;
using System.Data;
using System.Data.Odbc;
using System.Data.SqlClient;
//using System.Windows.Forms;
using System.Text;
using System.Runtime.InteropServices;namespace ColorDBTools
{
/// <summary>
/// clsExecuteDB 这个类主要是用来完成操作数据库的连接与关闭等工作, 以及执行SQL语句:带参数,不带参数
/// </summary>
public class clsExecuteDB
{
[DllImport( "kernel32" )]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
[DllImport ( "kernel32" )]
private static extern int GetPrivateProfileString (string section, string key, string def, StringBuilder retVal, int size, string filePath);
public string error = ""; //返回数据库连接方面的错误信息
private string StrConnString = null;
public clsExecuteDB(bool BlnOdbc)
{
string m_strIniPathFile = ""; StringBuilder t_strValue = new StringBuilder(256);
long i = GetPrivateProfileString ("DBServer", "Server", "(local)", t_strValue, 256, m_strIniPathFile);
string Server = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "ODBC", "ColorFun", t_strValue, 256, m_strIniPathFile);
string ODBC = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "Database", "ColorFun", t_strValue, 256, m_strIniPathFile);
string Database = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "UserID", "sa", t_strValue, 256, m_strIniPathFile);
string UserID = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "PWD", "", t_strValue, 256, m_strIniPathFile);
string PWD = t_strValue.ToString();
if(BlnOdbc)
{
//Trusted_connection=Yes;(NND, 这commented的部分在网页中不支持, 但在一般的应用中是支持的, 这一点搞了我N长时间)
StrConnString = "DRIVER={SQL SERVER}; SERVER=" + Server + "; Network=DBMSSOCN; Database=" + ODBC + "; UID=" + UserID + "; Pwd=" + PWD;
}
else
{
//Trusted_connection=Yes;(NND, 这commented的部分在网页中不支持, 但在一般的应用中是支持的, 这一点搞了我N长时间)
StrConnString = "SERVER=" + Server + "; Network=DBMSSOCN; UID=" + UserID + "; Pwd=" + PWD + "; Database=" + Database;
}
} public long DoGetDataTable(string strsql, ref DataTable tb)
{
try
{
SqlConnection conn = new SqlConnection(StrConnString);
SqlDataAdapter adapter = new SqlDataAdapter(strsql, conn);
conn.Open(); adapter.Fill(tb);
conn.Close();
}
catch(Exception e0)
{
error = e0.Message;
} return tb.Rows.Count;
} public long DoExcute(string strsql)
{
long t_lngRcdNum = 0;
SqlConnection conn = null;
SqlTransaction trans = null;
try
{
conn = new SqlConnection(StrConnString);
conn.Open();
trans = conn.BeginTransaction();
SqlCommand comm = new SqlCommand(strsql, conn, trans);
t_lngRcdNum = comm.ExecuteNonQuery();
trans.Commit();
}
catch(Exception e0)
{
error = e0.Message;
try
{
trans.Rollback();
}
catch(Exception e1)
{
error = e1.Message;
}
}
finally
{
conn.Close();
} return t_lngRcdNum;
} public void ExecuteParameterSQL(string strsql, ref long rcdNum, IDataParameter[] dp)
{
OdbcConnection conn = null;
OdbcTransaction trans = null;
try
{
conn = new OdbcConnection(StrConnString);
conn.Open();
trans = conn.BeginTransaction();
OdbcCommand comm = new OdbcCommand(strsql, conn, trans);
for(int i=0; i<dp.Length; i++)
{
comm.Parameters.Add(dp[i]);
}
rcdNum = comm.ExecuteNonQuery();
trans.Commit();
}
catch(Exception e0)
{
error = e0.Message;
try
{
trans.Rollback();
}
catch(Exception e1)
{
error = e1.Message;
}
}
finally
{
conn.Close();
}
} public bool ExecuteProcedure(string userdata, string commandtype, ref string msg)
{
msg = null;
SqlConnection conn = null;
SqlCommand comm = null;
try
{
conn = new SqlConnection(StrConnString);
conn.Open();
comm = new SqlCommand();
comm.Connection = conn;
/*
//@UserData varchar(50), @msg varchar(8000), @CommendType varchar(20)
SqlParameter sqlp = new SqlParameter(); //声明一个Parameter
sqlp = comm.Parameters.Add("@UserData", SqlDbType.VarChar, 50); //一般参数的指定
sqlp.Value = userdata;
sqlp = comm.Parameters.Add("@CommendType", SqlDbType.VarChar, 20);
sqlp.Value = commandtype;
sqlp = comm.Parameters.Add("@msg", SqlDbType.VarChar, 8000); //存储过程中的输出参数
sqlp.Direction = ParameterDirection.Output;
*/
SqlParameter[] aa = new SqlParameter[3];
aa[0] = new SqlParameter("@UserData", SqlDbType.VarChar, 50);
aa[0].Value = userdata;
aa[1] = new SqlParameter("@CommendType", SqlDbType.VarChar, 20);
aa[1].Value = commandtype; aa[2] = new SqlParameter("@Msg", SqlDbType.VarChar, 8000);
aa[2].Direction = ParameterDirection.Output; for(int i=0; i<3; i++) comm.Parameters.Add(aa[i]);
comm.CommandText = "sp_WapInterface";
comm.CommandType = CommandType.StoredProcedure;
comm.ExecuteNonQuery();
msg = comm.Parameters[2].Value.ToString();
}
catch(Exception e0)
{
error = e0.Message;
}
finally
{
conn.Close();
} return msg!=null;
}
}
}
一上是数据操作
下一帖是显示列表字段
clsExecuteDB.cs//数据操作
using System;
using System.Data;
using System.Data.Odbc;
using System.Data.SqlClient;
//using System.Windows.Forms;
using System.Text;
using System.Runtime.InteropServices;namespace ColorDBTools
{
/// <summary>
/// clsExecuteDB 这个类主要是用来完成操作数据库的连接与关闭等工作, 以及执行SQL语句:带参数,不带参数
/// </summary>
public class clsExecuteDB
{
[DllImport( "kernel32" )]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
[DllImport ( "kernel32" )]
private static extern int GetPrivateProfileString (string section, string key, string def, StringBuilder retVal, int size, string filePath);
public string error = ""; //返回数据库连接方面的错误信息
private string StrConnString = null;
public clsExecuteDB(bool BlnOdbc)
{
string m_strIniPathFile = ""; StringBuilder t_strValue = new StringBuilder(256);
long i = GetPrivateProfileString ("DBServer", "Server", "(local)", t_strValue, 256, m_strIniPathFile);
string Server = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "ODBC", "ColorFun", t_strValue, 256, m_strIniPathFile);
string ODBC = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "Database", "ColorFun", t_strValue, 256, m_strIniPathFile);
string Database = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "UserID", "sa", t_strValue, 256, m_strIniPathFile);
string UserID = t_strValue.ToString();
i = GetPrivateProfileString ("DBServer", "PWD", "", t_strValue, 256, m_strIniPathFile);
string PWD = t_strValue.ToString();
if(BlnOdbc)
{
//Trusted_connection=Yes;(NND, 这commented的部分在网页中不支持, 但在一般的应用中是支持的, 这一点搞了我N长时间)
StrConnString = "DRIVER={SQL SERVER}; SERVER=" + Server + "; Network=DBMSSOCN; Database=" + ODBC + "; UID=" + UserID + "; Pwd=" + PWD;
}
else
{
//Trusted_connection=Yes;(NND, 这commented的部分在网页中不支持, 但在一般的应用中是支持的, 这一点搞了我N长时间)
StrConnString = "SERVER=" + Server + "; Network=DBMSSOCN; UID=" + UserID + "; Pwd=" + PWD + "; Database=" + Database;
}
} public long DoGetDataTable(string strsql, ref DataTable tb)
{
try
{
SqlConnection conn = new SqlConnection(StrConnString);
SqlDataAdapter adapter = new SqlDataAdapter(strsql, conn);
conn.Open(); adapter.Fill(tb);
conn.Close();
}
catch(Exception e0)
{
error = e0.Message;
} return tb.Rows.Count;
} public long DoExcute(string strsql)
{
long t_lngRcdNum = 0;
SqlConnection conn = null;
SqlTransaction trans = null;
try
{
conn = new SqlConnection(StrConnString);
conn.Open();
trans = conn.BeginTransaction();
SqlCommand comm = new SqlCommand(strsql, conn, trans);
t_lngRcdNum = comm.ExecuteNonQuery();
trans.Commit();
}
catch(Exception e0)
{
error = e0.Message;
try
{
trans.Rollback();
}
catch(Exception e1)
{
error = e1.Message;
}
}
finally
{
conn.Close();
} return t_lngRcdNum;
} public void ExecuteParameterSQL(string strsql, ref long rcdNum, IDataParameter[] dp)
{
OdbcConnection conn = null;
OdbcTransaction trans = null;
try
{
conn = new OdbcConnection(StrConnString);
conn.Open();
trans = conn.BeginTransaction();
OdbcCommand comm = new OdbcCommand(strsql, conn, trans);
for(int i=0; i<dp.Length; i++)
{
comm.Parameters.Add(dp[i]);
}
rcdNum = comm.ExecuteNonQuery();
trans.Commit();
}
catch(Exception e0)
{
error = e0.Message;
try
{
trans.Rollback();
}
catch(Exception e1)
{
error = e1.Message;
}
}
finally
{
conn.Close();
}
} public bool ExecuteProcedure(string userdata, string commandtype, ref string msg)
{
msg = null;
SqlConnection conn = null;
SqlCommand comm = null;
try
{
conn = new SqlConnection(StrConnString);
conn.Open();
comm = new SqlCommand();
comm.Connection = conn;
/*
//@UserData varchar(50), @msg varchar(8000), @CommendType varchar(20)
SqlParameter sqlp = new SqlParameter(); //声明一个Parameter
sqlp = comm.Parameters.Add("@UserData", SqlDbType.VarChar, 50); //一般参数的指定
sqlp.Value = userdata;
sqlp = comm.Parameters.Add("@CommendType", SqlDbType.VarChar, 20);
sqlp.Value = commandtype;
sqlp = comm.Parameters.Add("@msg", SqlDbType.VarChar, 8000); //存储过程中的输出参数
sqlp.Direction = ParameterDirection.Output;
*/
SqlParameter[] aa = new SqlParameter[3];
aa[0] = new SqlParameter("@UserData", SqlDbType.VarChar, 50);
aa[0].Value = userdata;
aa[1] = new SqlParameter("@CommendType", SqlDbType.VarChar, 20);
aa[1].Value = commandtype; aa[2] = new SqlParameter("@Msg", SqlDbType.VarChar, 8000);
aa[2].Direction = ParameterDirection.Output; for(int i=0; i<3; i++) comm.Parameters.Add(aa[i]);
comm.CommandText = "sp_WapInterface";
comm.CommandType = CommandType.StoredProcedure;
comm.ExecuteNonQuery();
msg = comm.Parameters[2].Value.ToString();
}
catch(Exception e0)
{
error = e0.Message;
}
finally
{
conn.Close();
} return msg!=null;
}
}
}
一上是数据操作
下一帖是显示列表字段
解决方案 »
- ASP.NET源代码 IIS发布 出现 分析器错误信息: 未能加载类型
- 请教一下JS有没有办法回传多个值
- AJAX textbox输入<p>等html标记时 服务器500错误
- XML格式的记录在数据库中的更新问题
- 水平比较菜,向高手请教,在线等!!!
- "相关文章"的选取策略
- 在datalist里面嵌套button按钮问题
- 自定义控件(ascx)中的javascript脚本调用一个HtmlInputText控件的问题
- 请大家推荐几个本!
- asp.net怎么调用存储过程?在线等,高分相送,不够分再给
- 微软网站上不去了?怎么回事?
- 新手问题,请高手指点,关于Access中存放word文档,用Asp读取的问题,第四遍发帖了!
得到列表字段:clsColorDBTools.cs
using System;namespace ColorDBTools
{
/// <summary>
/// 定义表ColorNick的字段序列
/// </summary>
#region ColorNick Table's Fields Definition
[Serializable]
public class clsColorNick
{
public string m_strNO = "";
public string m_strTitle = "";
}
#endregion /// <summary>
/// 定义表ColorBBSMsg的字段序列
/// </summary>
#region ColorBBSMsg Table's Fields Definition
[Serializable]
public class clsColorBBSMsg
{
public string m_strNO = "";
public string m_strFatherNO = "";
public string m_strUserID = "";
public string m_strTitle = "";
public string m_strDetail = "";
public string m_strRegion = "";
public string m_strSubDate = "";
public string m_strStatus = "";
public string m_strWelStatus = "";
}
#endregion
/// 实现对数据表clsColorBBSMsg class的具体操作.
/// </summary>
public class clsColorBBSMsg_Impl
{
/// <summary>
/// Construction Method
/// </summary>
public clsColorBBSMsg_Impl()
{
} #region 有玩家插入了一帖子,要判断该帖子是谁的子贴子,如果p_strFatherNo为"0000000000",则表明此帖子没有父级帖子
public bool blnDoAddBBS(clsColorBBSMsg p_clsColorBBSMsg, ref string p_strNewNO)
{
string StrSql = "insert into ColorBBSMsg values(?, ?, ?, ?, ?, ?, ?, ?, ?)"; IDataParameter p0 = new OdbcParameter(); //"NO"
p_strNewNO = clsPrivateUtility.m_strGetNewID("NO", "ColorBBSMsg", true);
p0.Value = p_strNewNO;
IDataParameter p1 = new OdbcParameter(); //"FatherNO"
p1.Value = p_clsColorBBSMsg.m_strFatherNO;
IDataParameter p2 = new OdbcParameter(); //"UserID"
p2.Value = p_clsColorBBSMsg.m_strUserID;
IDataParameter p3 = new OdbcParameter(); //"Title"
p3.Value = p_clsColorBBSMsg.m_strTitle;
IDataParameter p4 = new OdbcParameter(); //"Detail"
p4.Value = p_clsColorBBSMsg.m_strDetail;
IDataParameter p5 = new OdbcParameter(); //"Region"
p5.Value = p_clsColorBBSMsg.m_strRegion;
IDataParameter p6 = new OdbcParameter(); //"SubDate"
p6.Value = clsPrivateUtility.m_strGetCurDateTime();
IDataParameter p7 = new OdbcParameter(); //"Status"
p7.Value = p_clsColorBBSMsg.m_strStatus;
IDataParameter p8 = new OdbcParameter(); //"WelStatus"
p8.Value = p_clsColorBBSMsg.m_strWelStatus;
IDataParameter[] p = new IDataParameter[9];
p[0] = p0;
p[1] = p1;
p[2] = p2;
p[3] = p3;
p[4] = p4;
p[5] = p5;
p[6] = p6;
p[7] = p7;
p[8] = p8; long t_lngRcdNum = 0;
new clsExecuteDB(true).ExecuteParameterSQL(StrSql, ref t_lngRcdNum, p); return (t_lngRcdNum == 1);
}
#endregion #region 提取p_strFatherNO所指示的帖子的所有子帖子的Title,如果取出最顶级帖子,只需要p_strFatherNO="00000000000"
public long lngGetChildrenTitles(out clsColorBBSMsg[] p_clsBBSMsg, string p_strRegion, string p_strFatherNO)
{
p_clsBBSMsg = null;
string StrSql = "select NO, UserID, Title from ColorBBSMsg where Region='" + p_strRegion + "' and FatherNO='" + p_strFatherNO + "' order by SubDate asc";
DataTable dt = new DataTable("ColorBBSMsg"); long t_lngRcdNum = new clsExecuteDB(false).DoGetDataTable(StrSql, ref dt);
if(t_lngRcdNum > 0)
{
p_clsBBSMsg = new clsColorBBSMsg[t_lngRcdNum];
for(int i=0; i<t_lngRcdNum; i++)
{
p_clsBBSMsg[i] = new clsColorBBSMsg();
p_clsBBSMsg[i].m_strNO = dt.Rows[i]["NO"].ToString();
p_clsBBSMsg[i].m_strUserID = dt.Rows[i]["UserID"].ToString();
p_clsBBSMsg[i].m_strTitle = dt.Rows[i]["Title"].ToString();
}
} return t_lngRcdNum;
}
#endregion #region 提取p_strUserID所指示的所有帖子的Title
public long lngGetMyTitles(out clsColorBBSMsg[] p_clsBBSMsg, string p_strRegion, string p_strUserID)
{
p_clsBBSMsg = null;
string StrSql = "select NO, UserID, Title from ColorBBSMsg where Region='" + p_strRegion + "' and UserID='" + p_strUserID + "' order by SubDate asc";
DataTable dt = new DataTable("ColorBBSMsg"); long t_lngRcdNum = new clsExecuteDB(false).DoGetDataTable(StrSql, ref dt);
if(t_lngRcdNum > 0)
{
p_clsBBSMsg = new clsColorBBSMsg[t_lngRcdNum];
for(int i=0; i<t_lngRcdNum; i++)
{
p_clsBBSMsg[i] = new clsColorBBSMsg();
p_clsBBSMsg[i].m_strNO = dt.Rows[i]["NO"].ToString();
p_clsBBSMsg[i].m_strUserID = dt.Rows[i]["UserID"].ToString();
p_clsBBSMsg[i].m_strTitle = dt.Rows[i]["Title"].ToString();
}
} return t_lngRcdNum;
}
#endregion #region 提取指定NO的帖子的Detail字段
public bool blnGetDetail(ref string p_strNO, ref string p_strTitle, ref string p_strDetail,
ref string p_strNickName, string p_strNOIn, string p_strUserID, string p_strRegion)
{
string StrSql = "select t1.NO, t1.Title, t1.Detail, t2.NickName from ColorBBSMsg t1, ColorUser t2 " +
"where t1.Region='" + p_strRegion + "' and t1.NO='" + p_strNOIn + "' and t2.UserID='" + p_strUserID + "'";
DataTable dt = new DataTable("ColorBBSMsg"); long t_lngRcdNum = new clsExecuteDB(false).DoGetDataTable(StrSql, ref dt);
if(t_lngRcdNum == 1)
{
p_strNO = dt.Rows[0]["NO"].ToString();
p_strTitle = dt.Rows[0]["Title"].ToString();
p_strDetail = dt.Rows[0]["Detail"].ToString();
p_strNickName = dt.Rows[0]["NickName"].ToString();
} return (t_lngRcdNum == 1);
}
#endregion
<%@ Page Language="C#" ContentType="text/vnd.wap.wml" ResponseEncoding="UTF-8" %>
<%@ Import NameSpace="ColorDBTools" %>
<%
//----------------test------------------------------------------------------------------------------
//Session["OPERATION"] = "00001"; //该业务的编号
//Session["MOBILE"] = "00000000011"; //为一句到真机上运行时就没用了,只是为方便在PC机上的测试
//--------------end test----------------------------------------------------------------------------string t_strNOIn = "";//三种状态:
//lt:显示顶级所有帖子标题列表(list);
//dt:进入帖子,显示其详情并且把它下面的所有子帖了显示出来(detail);
//fw:显示跟帖输入框(follow)
string action = Request.Params["action"];
if(action == null) action = "lt";
else if(action.Equals("dt2"))
{
action = "dt"; clsColorBBSMsg t_clsColorBBSMsg = new clsColorBBSMsg();
t_clsColorBBSMsg.m_strFatherNO = Request.Params["no"]; //该帖子的父母编号
t_clsColorBBSMsg.m_strUserID = Request.Params["userid"]; ///发帖人的userid
t_clsColorBBSMsg.m_strTitle = Request.Params["title"];
t_clsColorBBSMsg.m_strDetail = Request.Params["content"];
t_clsColorBBSMsg.m_strRegion = "00000";
t_clsColorBBSMsg.m_strStatus = "1";
t_clsColorBBSMsg.m_strWelStatus = "1";
if(new clsColorBBSMsg_Impl().blnDoAddBBS(t_clsColorBBSMsg, ref t_strNOIn))
{
}
else
{
action = "fw";
Response.Redirect("ColorBBS.aspx?t=1&action=fw&header=" + Request.Params["header"] + "&fatherno=" + t_clsColorBBSMsg.m_strFatherNO +
"&title=" + t_clsColorBBSMsg.m_strTitle + "&content=" + t_clsColorBBSMsg.m_strDetail);
}
}
%>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
</head>
<%if(action.Equals("lt"))
{//取出所有顶级的帖子,其FatherNO编号都为"0000000000"
clsColorBBSMsg[] t_clsColorBBSMsg;
long t_lngRcdNum = new clsColorBBSMsg_Impl().lngGetChildrenTitles(out t_clsColorBBSMsg, "00000", "0000000000"); //region, fatherno
%>
<card id="bbs" title="色彩BBS">
<p align="left">
<%for(int i=0; i<t_lngRcdNum; i++)
{%>
<anchor><%=t_clsColorBBSMsg[i].m_strTitle%>
<go href="ColorBBS.aspx?" method="post">
<postfield name="action" value="dt" />
<postfield name="no" value="<%=t_clsColorBBSMsg[i].m_strNO%>" />
<postfield name="userid" value="<%=t_clsColorBBSMsg[i].m_strUserID%>" />
</go>
</anchor><br/>
<%}%>
<a href="ColorBBS.aspx?action=fw&header=新帖子&fatherno=0000000000" title="发新帖子">发新帖子</a><br/>
<a href="Register.aspx?action=mn" title="返回主菜单">返回主菜单</a><br/>
<a href="http://wap.monternet.com" title="返回梦网">返回梦网</a>
</p>
</card>
<%}
else if(action.Equals("dt")) //开始显示选中帖子的详情
{
if(t_strNOIn.Length == 0) t_strNOIn = Request.Params["no"]; //该帖子的编号
string t_strUserID = Request.Params["userid"]; //发帖人的userid
string t_strNO = "";
string t_strTitle = "";
string t_strDetail = "";
string t_strNickName = "";
new clsColorBBSMsg_Impl().blnGetDetail(ref t_strNO, ref t_strTitle, ref t_strDetail, ref t_strNickName, t_strNOIn, t_strUserID, "00000");
clsColorBBSMsg[] t_clsColorBBSMsg;
long t_lngRcdNum = new clsColorBBSMsg_Impl().lngGetChildrenTitles(out t_clsColorBBSMsg, "00000", t_strNO);
%>
<card id="detail" title="<%=t_strTitle%>">
<p align="left">
<%=t_strDetail%> 来自[<%=t_strNickName%>]
<%for(int i=0; i<t_lngRcdNum; i++)
{%>
<%=i+1%>:
<anchor><%=t_clsColorBBSMsg[i].m_strTitle%>
<go href="ColorBBS.aspx?" method="post">
<postfield name="action" value="dt" />
<postfield name="no" value="<%=t_clsColorBBSMsg[i].m_strNO%>" />
<postfield name="userid" value="<%=t_clsColorBBSMsg[i].m_strUserID%>" />
</go>
</anchor><br/>
<%}%>
<anchor>跟帖
<go href="ColorBBS.aspx?" method="post">
<postfield name="action" value="fw" />
<postfield name="header" value="跟帖" />
<postfield name="fatherno" value="<%=t_strNO%>" />
</go>
</anchor><br/>
<a href="ColorBBS.aspx?action=lt" title="返回色区bbs">返回色区bbs</a><br/>
<a href="Register.aspx?action=mn" title="返回主菜单">返回主菜单</a>
</p>
</card>
<%}
else if(action.Equals("fw")) //显示跟帖表单
{
string t_strFatherNO = Request.Params["fatherno"];
string t_strHeader = Request.Params["header"];
string t_strTitle = Request.Params["title"];
if(t_strTitle == null) t_strTitle = "标题";
string t_strContent = Request.Params["content"];
if(t_strContent == null) t_strContent = "内容";
%>
<card id="follow" title="<%=t_strHeader%>">
<p align="left">
<%if(Request.Params["t"] != null) Response.Write("数据库操作出错啦,稍后再试!<br/>");%>
标题:<input name="title" value="<%=t_strTitle%>" maxlength="40" /><br/>
内容:<input name="content" value="<%=t_strContent%>" maxlength="100" /><br/>
<anchor>提交
<go href="ColorBBS.aspx?" method="post">
<postfield name="action" value="dt2" />
<postfield name="header" value="<%=t_strHeader%>" />
<postfield name="no" value="<%=t_strFatherNO%>" /> <!--这里发送的是新帖子的fatherid-->
<postfield name="userid" value="<%=(string)Session["MOBILE"]%>" />
<postfield name="title" value="$title" />
<postfield name="content" value="$content" />
</go>
</anchor>
</p>
</card>
<%}%>
</wml>