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;
using System.Data.SqlClient;

public partial class uc_news_styte2 : System.Web.UI.UserControl
{
    private string rss;
    private int strlength;
    public string Rss
    {
        set
        {
            this.rss = value.ToString().Trim();
        }
    }
    public int StrLength
    {
        set
        {
            this.strlength =Convert.ToInt32(value.ToString().Trim());
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.databind();
    }
    protected void databind()
    {
        SqlConnection conn = CDatabase.wtoconn();
        conn.Open();
        SqlDataAdapter sda = new SqlDataAdapter("select * from newsSole", conn);
        DataSet ds=new DataSet();
        sda.Fill(ds,"cu");
        this.GridView1.DataSource=ds;
        this.GridView1.DataKeyNames = new string[] { "id" };
        this.GridView1.DataBind();
        conn.Close();
    }
}
