TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bineesh Viswanath
NA
1k
776.3k
Display Image using DataList Control in ASP.NET
Aug 28 2013 2:58 AM
Sir, I am doing a DataList Control program in ASP.NET
My Task is to retrieve image and name from database and display using DataList.
I did the function: uploading, saving.
But my DataList is not visible in runtime.
I want your help in this.
now i want to view images in DataList Control.
here the code I using to Load Image to DataList(dlImages).
public void GalleryView()
{
if (sqlCon.State == ConnectionState.Closed)
{
sqlCon.Open();
}
SqlCommand cmd = new SqlCommand("imageViewAll", sqlCon);
SqlDataAdapter sqlda = new SqlDataAdapter(cmd);
DataTable dtbl = new DataTable();
dlImages.DataSource = dtbl;
dlImages.DataBind();
dlImages.Attributes.Add("bordercolor", "black");
}
And called it in page_Load()
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GalleryView();
}
}
Reply
Answers (
7
)
Eval & Bind
Login page Role base Default page Menu. Hide and Show Menu