アーティスト名がLata Mangeshkarであるレコードを、アーティスト列を持つup_songテーブルから取得したい.1.Lata Mangeshkar 2.Lata Mangeshkar,sunidhi chuhan 3.Mohit chuhan, Ashaji ,Lata Mangeshkarのようなレコード.
曲.aspx
string lata = hlinklata.Text;
hlinklata.NavigateUrl = "DisplayList.aspx?name=" + lata;
Displylist.aspx
lblheader.Text = Request.QueryString["name"];
String sql = "SELECT title, song_id, movie_name, size FROM up_song WHERE artist LIKE '%"+ lblheader.Text +" %' ";
adpt = new SqlDataAdapter(sql, con);
DataSet ds = new DataSet();
adpt.Fill(ds, "title");
var last6Uploaded = ds.Tables["title"].AsEnumerable().OrderByDescending(r => r.Field<int>("song_id"));
foreach (DataRow row in last6Uploaded)
{
int songID = row.Field<int>("song_id");
HyperLink hl = new HyperLink();
hl.ID = "hyperlink" + songID;
string title = row.Field<string>("title");
hl.Text = title;
hl.NavigateUrl = "Downloadpage.aspx?name=" + title;
hl.ForeColor = System.Drawing.Color.White;
Paneltitle.Controls.Add(hl);
Paneltitle.Controls.Add(new LiteralControl("<br>"));
}