In a DataList, I'm using the following:
<%# DataBinder.Eval(Container.DataItem, "characterization")%>
I was wondering if it's possible to create a string that would contain
the value of the above line, so that I can manipulate it:
I tried
string resultText = DataBinder.Eval(Container.DataItem, "characterization");
....but I get an error saying "Container" does not exist in the current
context.
Any advise on how to get the value of "characterization" into "resultText"? 3 1175
An easy way to manipulate it is to pass it to a function. You could put a
function in the code behind :
public string DoStringWord(string characterization){
return characterization; //Do something here
}
and in the page put:
<%# DoStringWord(DataBinder.Eval(Container.DataItem, "characterization")) %>
Give it a go.
Ciaran O'Donnell http://wannabedeveloper.spaces.live.com
"Kevin Blount" wrote:
In a DataList, I'm using the following:
<%# DataBinder.Eval(Container.DataItem, "characterization")%>
I was wondering if it's possible to create a string that would contain
the value of the above line, so that I can manipulate it:
I tried
string resultText = DataBinder.Eval(Container.DataItem, "characterization");
....but I get an error saying "Container" does not exist in the current
context.
Any advise on how to get the value of "characterization" into "resultText"?
Hi Ciaran,
I gave that a try, but had to make a small modification. The method
(DoStringWord) was expecting a string. Once I figured that out, and
added .ToString() at the end of the call, your script worked wonderfully!
<%# DoStringWord(DataBinder.Eval(Container.DataItem,
"characterization").ToString()) %>
Thanks for the reply and the answer :)
Kevin
Ciaran O''Donnell wrote:
An easy way to manipulate it is to pass it to a function. You could put a
function in the code behind :
public string DoStringWord(string characterization){
return characterization; //Do something here
}
and in the page put:
<%# DoStringWord(DataBinder.Eval(Container.DataItem, "characterization")) %>
Give it a go.
Ciaran O'Donnell http://wannabedeveloper.spaces.live.com
"Kevin Blount" wrote:
>In a DataList, I'm using the following:
<%# DataBinder.Eval(Container.DataItem, "characterization")%>
I was wondering if it's possible to create a string that would contain the value of the above line, so that I can manipulate it:
I tried
string resultText = DataBinder.Eval(Container.DataItem, "characterization");
....but I get an error saying "Container" does not exist in the current context.
Any advise on how to get the value of "characterization" into "resultText"?
Hi Ciaran,
I gave that a try, but had to make a small modification. The method
(DoStringWord) was expecting a string. Once I figured that out, and
added .ToString() at the end of the call, your script worked wonderfully!
<%# DoStringWord(DataBinder.Eval(Container.DataItem,
"characterization").ToString()) %>
Thanks for the reply and the answer :)
Kevin
Ciaran O''Donnell wrote:
An easy way to manipulate it is to pass it to a function. You could put a
function in the code behind :
public string DoStringWord(string characterization){
return characterization; //Do something here
}
and in the page put:
<%# DoStringWord(DataBinder.Eval(Container.DataItem, "characterization")) %>
Give it a go.
Ciaran O'Donnell http://wannabedeveloper.spaces.live.com
"Kevin Blount" wrote:
>In a DataList, I'm using the following:
<%# DataBinder.Eval(Container.DataItem, "characterization")%>
I was wondering if it's possible to create a string that would contain the value of the above line, so that I can manipulate it:
I tried
string resultText = DataBinder.Eval(Container.DataItem, "characterization");
....but I get an error saying "Container" does not exist in the current context.
Any advise on how to get the value of "characterization" into "resultText"? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michelle Keys |
last post by:
Subject: DataBinder.Eval Error!
Server Error in '/MSPOS' Application.
------------------------------------------------------------------------
--------
DataBinder.Eval:...
|
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:
...
|
by: Chris |
last post by:
Hey
Okay using DataBinder.Eval in a repeater.
My question is this - if the value is empy, eg the myDownloadFile is empty,
how can i display different output than if it was populated.
#...
|
by: George Durzi |
last post by:
Here's my asp:Repeater
<asp:Repeater ID="rptHelpDeskSystemStatus" Runat="server">
<HeaderTemplate>
<table width="100%" border="0" class="datatable">
<tr class="item">
</HeaderTemplate>...
|
by: Pierre Shirvan |
last post by:
I have a form with a DataList control with a label control and a text control
in the ItemTemplate section. I can display the data in the text contol using
the DataBinder.Eval method and I also want...
| |
by: Patrick Olurotimi Ige |
last post by:
If have i a funtion below:-
Protected Function CheckUnit(Units As Object) As String
'-----------------------------------------
' If the Units returned equals to Zero,
' a message of "Out of...
|
by: Mark Jones |
last post by:
I am quite new to ASP and .Net development and I am building a web-based
multiple choice exam application.
The web page displays the questions using a Repeater control and the
answers are nested...
|
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...
|
by: Kevin Blount |
last post by:
In a DataList, I'm using the following:
<%# DataBinder.Eval(Container.DataItem, "characterization")%>
I was wondering if it's possible to create a string that would contain
the value of the...
|
by: WT |
last post by:
Hello,
I have a usercontrol loaded in a page with a theme.
This usercontrol contains columns template with hyperlinks, with skinID.
The columns are not displayed, seems thta there is some...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |