473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How To ??? combine appSettings with DataBinder.Eval

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='<%# IsImageAvailable(DataBinder.Eval(Container.DataIte m, "Image1"),DataBinder.Eval(Container.DataItem, "Filetype")) %>'
src='<%# "http://localhost/RobAudioVideo/images/" & DataBinder.Eval(Container.DataItem, "Image1") %>' />

I appreciate help swapping out the hardcode & DataBinder with an appSetting and DataBinder call. Thanks Rob
Aug 21 '07 #1
1 2130
jhardman
3,406 Expert 2GB
Hey, Rob,

Welcome to the Scripts developer network. I hope someone here will be able to help you. First off, what is your version of asp and what is your development platform?

Jared
Aug 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
2
by: dm_dal | last post by:
I have a control on my webform that I am binding to a dataset. The issue is, the field value in the dataset is encrypted and I am trying to decrypt it during the binding process: Example: ...
5
by: bg | last post by:
Hi! How do I check if "date" exists before using that code? I've built a RSSreader and sometimes there's a date in it and sometimes not. How can I check if it exists to avoid crash...
4
by: Søren Lund | last post by:
Hello, I am trying to bind a DataGrid with some data from a DataSet which contains fields in the form "group.fieldname". I am certain that my data source contains the field but I cannot get my...
1
by: Mike Lerch | last post by:
Pretty much, TSIA, but I'll expand a bit: I'm still trying to get my head around the n-tier approach to web design. It seems to me that when you use DataBinder.Eval in the ASPX that your tiers...
1
by: CuMPeEWeEr [No MCSD] | last post by:
I am trying to combine FirstName and LastName to display in one column on DataGrid, but it gave me an error saying "Preprocessor directives must appear as the first non-whitespace character on a...
10
by: DBLWizard | last post by:
Howdy, I need to compine two columns (LastName, Firstname) with the comma. The only problem I have is the Firstname could be blank and in that case I don't want the "," appended to the last...
3
by: Eric Newton | last post by:
Given databinding an array of System.Version types: Given that "SomeObject" type has a Version property: public class SomeObject { public Version Version { get; } public string Description {...
4
by: CharlesA | last post by:
a general question... I'm a bit mystified by Databinder.eval(object, Colname, ) if controls can be bound to their individual data sources within the load event of the page... why would we ever...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.