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 8843243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:10:20+00:00 2026-06-14T11:10:20+00:00

I have a Visual Studio 2005 site which has been up a running for

  • 0

I have a Visual Studio 2005 site which has been up a running for a while. I have an image (.JPG) on this site that I think I need to apply some JavaScript to or something?

Essentially I have 25 images for the month of December and instead of going into the site daily to change this image to another one I was hoping to be able to complete this by code automatically.

I have some .NET skills but I think that I might needs to use JavaScript to complete this task. Can anyone point me in the right direction or provide me with some sample code that could help?

  • 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-14T11:10:21+00:00Added an answer on June 14, 2026 at 11:10 am

    I think the simplest way would be to rename all images to things like “December1.jpg”, “December2.jpg”, “December3.jpg” etc. Then server-side you would have this:

    <img src="/path/to/images/December<%=DateTime.Now.Day%>.jpg"/>
    

    This would just add the day of the month to your image name. There are fancier ways to do it, but for a one-time-deal, you can’t get much simpler than this.

    EDIT:
    You might also throw in an “if exists” for your images so that on the 26th you don’t end up with a 404 image. Something like this:

    Change your image to add an id and default it to hidden:

    <img id="dayImage" runat="server" Visibility="false" src="/path/to/images/December<%=DateTime.Now.Day%>.jpg"/>
    

    Then on the code behind:

    if (File.Exists(@"C:\path\to\images\December" + DateTime.Now.Day + ".jpg"))
    {
        //this will show the image if it exists on the disk
        dayImage.Visibility = true;
    }
    

    For more on that go here: http://www.dotnetperls.com/file-exists

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

Sidebar

Related Questions

I have a MS-Visual Studio 2005 workspace having all c code. This application(exe) allocates
(Using Visual Studio 2005 / .NET 2.0) I have a DataSet which is being
Visual Studio 2005 C++ Windows XP Pro I have a sample application that I
I have CruiseControl.net running Visual Studio (2005/2008 - using devenv.com) as we need to
I have a visual studio 2005 project with a custom build step that copies
I have been working on Visual Studio 2005 since last couple of days. Till
I have created a Windows Application in Visual Studio 2005. In this application, the
I have an executable build with Visual Studio 2005 using C#. dumpbin reports that
I have a project that was built in Visual Studio 2005 in C#. I
I am using C++ and Visual Studio 2005. I have a project that memory

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.