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
Smile
1.5k
202
37k
Image to fit in asp page
Jan 17 2018 7:08 AM
I am displaying image from a folder using an asp image control in a timer.The image doest not correctly fit into the screen like it gets vertical and hortizontal scroll bars.
aspx code
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="BannerPanel" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="5000" Enabled="false" >
</asp:Timer>
<asp:Button ID="btnDisplay" runat="server" Text="Display " OnClick="btnDisplay_Click" />
<asp:Image ID="Image1" runat="server" style="width: 100%;" />
</ContentTemplate>
</asp:UpdatePanel>
code behind
string localstr = Server.MapPath("~//bin//Images//"+ Filename );
Byte[] bytes = File.ReadAllBytes(localstr);
string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
Image1.ImageUrl = "data:image/" + ext + ";base64," + base64String;
Reply
Answers (
4
)
display labels text dynamically in mvc
session problem