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

  • Home
  • SEARCH
  • 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 3438402
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:11:01+00:00 2026-05-18T08:11:01+00:00

Its been a while since I worked in asp.net and a very long time

  • 0

Its been a while since I worked in asp.net and a very long time since working in .NET 1.1. Here I am though in a legacy application that I can’t upgrade for the short term, and I need to fix a number of hard coded values and replace them with a value from my web.config file.

This is what I have:

<asp:Image id=Image1 runat="server" ImageUrl='http://<%# ConfigurationSettings.AppSettings["CorporateRootUrl"] %>/media/images/spacer.gif' width="16" height="10" />

<img src='http://<%# ConfigurationSettings.AppSettings["CorporateRootUrl"] %>/media/images/spacer.gif' width="16" height="10" runat="server">

I would PREFER to get the bottom example to pull from my web.config file, since that is what is used throughout this application, and it would make my life a ton easier.

I can pull the “CorporateRootUrl” value if I use it in the .cs code behind, but that doesn’t really help me. I have over 2500 places I need to change in this code.

I am SURE I am missing something simple, but I just can’t seem to figure it out.

  • 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-05-18T08:11:01+00:00Added an answer on May 18, 2026 at 8:11 am

    Try this:

    <img src="http://<% = ConfigurationSettings.AppSettings["CorporateRootUrl"] %>/media/images/spacer.gif" width="16" height="10">
    

    The # in your inline code, and the runat=server were the simple things tripping you up.

    Fortunately for you, I had a old 1.1 project open that I could reference. We weren’t doing the same thing as you need to, but my 1.1 is rusty too and looking at the code is helping me get some of it back.

    Good luck with the rest of your assignment!

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

Sidebar

Related Questions

It's been a while since I have worked with ASP.Net and C#. I am
It's been a while since I've created a new ASP.NET web application. (I've been
Ok, it's been a while since I've worked with classic asp so I'm a
So its been a while since I last touched the GUI for this application.
Ok, its been a while since I've worked with a Web References. I need
Its been a while since i am working with the AJAX and getting templates
It's been a while since I've worked with web services in .NET (back around
Its been a while since I had to do some Java/JSP... I have a
Its been a while since i have coded c++ and i have forgot an
it’s been a while since the last time I had to use regex, I

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.