Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8413663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:57:38+00:00 2026-06-10T00:57:38+00:00

I am creating a small application where i am reading am image from the

  • 0

I am creating a small application where i am reading am image from the database, storing the image in a file, and then setting the Image Control ImageURL property to the created file

The code is pretty straight forward

Dim m_Bytes As Byte() = DirectCast(command.ExecuteScalar, Byte())

    Dim strfn As String = "D:\" + Convert.ToString(DateTime.Now.ToFileTime()) + ".jpeg"

    Dim fs As New FileStream(strfn, FileMode.CreateNew, FileAccess.Write)

    fs.Write(m_Bytes, 0, m_Bytes.Length)
    fs.Flush()
    fs.Close()

    Image1.ImageUrl = strfn

The image is getting created properly at the location but the image control does not render an image . I checked the source of the page and the image control was pointing to

 <img id="Image1" src="D:\129901061171254403.jpeg" />

The src is pointing to the correct location…

Thanks in Advance….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:57:39+00:00Added an answer on June 10, 2026 at 12:57 am

    You must store the image in a location that is accessible under IIS.

    You could for instance have a folder under you application where you store the image. Let’s say your application is deployed in the folder d:\virtualDirs\myApp and you browse it on the url http://someserver.com/superapp/.

    You could then store the image in (for instance) the folder d:\virtualDirs\myApp\dynImages:

    d:\virtualDirs\myApp\dynImages\129901061171254403.jpeg
    

    and then set the ImageUrl:

    Image1.ImageUrl = "~/dynImages/129901061171254403.jpeg";
    

    Sending the local folder path in the webpage simply wont work since that is where the file is on the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was tasked with creating a small application for college, and have created a
I am creating a small database application. I want to store the count of
I'm creating a small application from which users can send mails, appointments and to-do
I am creating a small application that will be deployed on Window. The database
I'm creating a small c# winforms application. It uses a sqlite database to store
I created a small application to read some files from the disk and zip
I am creating a small application which will perform say 4 different, time consuming
I am creating small django application which holds some few questions (and answers for
I'm creating a small vb.net application, and I'm trying trying to write a list
I have a small application where I am creating a customer [Authorize] [AcceptVerbs(HttpVerbs.Post)] public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.