I know this question has been asked many times. However, I am unable to display the image from my db on the page.
I tried the following method.
protected void Page_Load(object sender, EventArgs e) {
Link to get the image.
<asp:Image runat="server" ImageUrl="~/givememypicture.aspx?pic=3" ID="testimage" />
The <asp:Image /> is between the <asp:Content > tags.
When I run this code and check firebug, it simply indicates: βFailed to load fiven-urlβ. I also tried to put the Respone.Con...(picture); part Respone.Con...(picture); into the public method and call this method with the specified byte var.
I am new to asp.net, but I have some more experience in C #. I start to dislike asp.net a lot ... I struggled with this for about 20 hours and tried many options, but no one worked.
It would be best if I could just fill out the image through code from the same page. It seems completely illogical to me to call another page to load the image.
Can someone please tell me what I'm doing wrong here?
Solution: The link to the main page is removed from the page directive on the page that processes the image response. Everything else has been removed, except for the @page directive in the aspx file itself.
Mixxiphoid Aug 08 2018-11-18T00: 00Z
source share