asp.net - How can I access a BCL class or property inline in a aspx page in .NET 1.1? -
its been while since worked in asp.net , long time since working in .net 1.1. here though in legacy application can't upgrade short term, , need fix number of hard coded values , replace them value web.config file.
this 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 prefer bottom example pull web.config file, since used throughout application, , make life ton easier.
i can pull "corporaterooturl" value if use in .cs code behind, doesn't me. have on 2500 places need change in code.
i sure missing simple, can't seem figure out.
try this:
<img src="http://<% = configurationsettings.appsettings["corporaterooturl"] %>/media/images/spacer.gif" width="16" height="10">
the # in inline code, , runat=server simple things tripping up.
fortunately you, had old 1.1 project open reference. weren't doing same thing need to, 1.1 rusty , looking @ code helping me of back.
good luck rest of assignment!
Comments
Post a Comment