try
{
SqlConnection con = new SqlConnection(strcon);
con.Open();
SqlCommand cmd = new SqlCommand("select * from main_menu", con);
SqlDataAdapter ad = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
ad.Fill(dt);
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
content += "<li><a href='" + dr["menu_url"] + "?pid=" + dr["id"] + "'" + ">" + dr["menu_name"] + "</a></li>";
}
nav.InnerHtml = content;
}
con.Close();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
This is the series of blog posts that will cover the topics discussed in the ASP.NET, C#, MVC, JQUERY and other .Net Programing Language.
Wednesday, 26 November 2014
Asphelp: How To Show multiple Image in ul & li using database
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment