📄 show_t_table.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class show_t_table : System.Web.UI.Page
{
string id;
string strtitle;
string strcontent;
int conut;
SCOM.fdataset fds;
public int Conut()
{
return conut;
}
string strContentOK;
public string StrContentOK()
{
return strContentOK;
}
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["ID"] == null)
{
Response.Write("你的页面有错");
}
else
{
id = Request["ID"];
fds = new SCOM.fdataset("SqlServer", ConfigurationManager.ConnectionStrings["ooofcudrpConnectionString"].ConnectionString);
DataTable dv = fds.Ttable("select t_title,t_context from t_table where t_id=" + id);
foreach (DataRow dr in dv.Rows)
{
strtitle = dr[0].ToString(); //得到标题
strcontent = dr[1].ToString(); //得到所有内容
}
//Label1.Text = strtitle;
string[] redioArrContent = strcontent.Split('|');
int intorder = 0;
if (!Page.IsPostBack) //页面有提交行为.不执行以下数据的重载
{
Response.Write("<table width=200 align=left>");
foreach (string strContentIN in redioArrContent)
{
conut = Convert.ToInt32(strContentIN.Split(',')[0]);
strContentOK = strContentIN.Split(',')[1];
int ct = conut * 10;
//RadioButtonList1.Items.Add(new ListItem(strContentOK, intorder.ToString()));
Response.Write("<tr width=100><td>" + strContentOK + "</td><td><hr align=left color=#00ff00 width=" + ct + "/></td><td align=right>" + conut + "票</td></tr>");
intorder++;
}
Response.Write("</table>");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -