www.pudn.com > flash-zhibo-yuanma.rar > config.aspx.cs, change:2007-10-08,size:1373b


using System; 
using System.Text; 
using System.Data; 
using System.Data.SqlClient; 
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 admin_config : Sp.baseadmin 
{ 
    protected override  void Page_Load(object sender, EventArgs e) 
    { 
        base.Page_Load(sender, e); 
        if (!Page.IsPostBack) 
        { 
            bind(); 
        }	// 在此处放置用户代码以初始化页面 
    } 
    void bind() 
    { 
        //DataSet ds = Sp.Base.ExecuteSql4Ds("SELECT bulletin FROM Sp_config"); 
        //TEXTAREA1.Value = ds.Tables[0].Rows[0].ItemArray[0].ToString(); 
    } 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        string ips = this.txtips.Text; 
 
        StringBuilder strSql = new StringBuilder(); 
        strSql.Append("insert into Sp_SerList("); 
        strSql.Append("ips)"); 
        strSql.Append(" values ("); 
        strSql.Append("@ips)"); 
        SqlParameter[] parameters = { 
					new SqlParameter("@ips", SqlDbType.VarChar,50)}; 
        parameters[0].Value = ips; 
 
        Sp.SQLServerDAL.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); 
        Page.DataBind(); 
    } 
}