private SqlConnection MyConn()
{
string setting = System.Configuration.ConfigurationManager.ConnectionStrings["myConnectionString"].ToString();
SqlConnection thisConn = new SqlConnection(setting);
return thisConn;
}
public string req_title(int id)
{
SqlConnection QConn = MyConn();
SqlDataAdapter myDap = new SqlDataAdapter("select article_title from t_article where art_id=" + id, QConn);
DataSet myDS = new DataSet();
myDap.Fill(myDS, "t_article");
return (myDS.Tables[0].Rows[0][0].ToString());
}