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
Akhter HUssain
715
1.3k
102.1k
Unable to cast object of type System.String to type System.B
Sep 23 2019 6:30 AM
I am passing data from one page to another page, but one image this exception is being raised that
Unable to cast object of type System.String to type System.Byte.
here is my second page html of image..
<asp:TemplateField HeaderText=
"Image"
>
<ItemTemplate>
<%--<asp:Image ID=
"img"
runat=
"server"
ImageUrl=
'<%# Eval("Data").ToString() %>'
Height=
"100px"
Width=
"100px"
/>--%>
<asp:Image ID=
"Data"
runat=
"server"
Width=
"100px"
Height=
"80px"
ImageUrl=
'<%# "data:image/jpg;base64," + Convert.ToBase64String((byte[])Eval("Data")) %>'
/>
</ItemTemplate>
Reply
Answers (
3
)
How call controller Action result with Ajax in Mvc?
Db name changed & Windows Service updated but not reflected.