Hi, I'm new to this forum and hope I can get some help.
I would like to make life easier by combining a appSetting (global variable set in the web.config file) and DataBinder.Eval to create a dynamic link to an image src
I have been trying alot of different variables, searching the net but no luck yet getting a combo that works. The following code works but I want to change out the "http://localhost/RobAudioVideo/images/" with a call to an appsetting so I only have to make a change in one place when I switch between different servers with different directory structures :
<img id="Image1" runat="server" width="50"
visible='<%# IsImageAvailabl e(DataBinder.Ev al(Container.Da taItem, "Image1"),DataB inder.Eval(Cont ainer.DataItem, "Filetype") ) %>'
src='<%# "http://localhost/RobAudioVideo/images/" & DataBinder.Eval (Container.Data Item, "Image1") %>' />
I appreciate help swapping out the hardcode & DataBinder with an appSetting and DataBinder call. Thanks Rob
I would like to make life easier by combining a appSetting (global variable set in the web.config file) and DataBinder.Eval to create a dynamic link to an image src
I have been trying alot of different variables, searching the net but no luck yet getting a combo that works. The following code works but I want to change out the "http://localhost/RobAudioVideo/images/" with a call to an appsetting so I only have to make a change in one place when I switch between different servers with different directory structures :
<img id="Image1" runat="server" width="50"
visible='<%# IsImageAvailabl e(DataBinder.Ev al(Container.Da taItem, "Image1"),DataB inder.Eval(Cont ainer.DataItem, "Filetype") ) %>'
src='<%# "http://localhost/RobAudioVideo/images/" & DataBinder.Eval (Container.Data Item, "Image1") %>' />
I appreciate help swapping out the hardcode & DataBinder with an appSetting and DataBinder call. Thanks Rob
Comment