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
narasiman rao
NA
519
772.1k
I tried but image path is not coming correctly
Jul 30 2016 8:50 AM
i am fetching the image from the folder
i have one folder called digital in that folder lot of images are there
Desintation CHN - TBM (Label Name)
in that digital folder CHN - TBM image is there. i want to check the image name and label name should be same. then display image
My code as follows
protected void Page_Load(object sender, EventArgs e)
{
string imgname = lbltext.Text.ToString();
string folderPath = Server.MapPath("digital/" + imgname);
if (folderPath == imgname.ToString())
{
lblresult.Text = folderPath;
}
}
But in folder path i get as follows when i check using break point
D:\Dot Net Practical Excercise\WebApplication1\WebApplication1\digital\CHN - TBM
from the above i want to get only CHN - TBM
in my above code what is the mistake i made.
Reply
Answers (
2
)
how to fetch the image from folder in asp.net using c#
Dicionary<String, List<ColorObject>> Linq Contains and Sort