473,473 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What is wrong with this code line?

Hello,

I have a BoundColumn in a datagrid. The DataField must be created using
the Session("culture") value. Shoudn't this work?

<asp:BoundColumn DataField='<% "title_" & Session("culture")
%>'></asp:BoundColumn>

What is wrong?

Thanks,
Miguel

Nov 19 '05 #1
4 1097
Bound syntax uses <%# ... %>
not <% ... %>

"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:u9**************@TK2MSFTNGP14.phx.gbl...
Hello,

I have a BoundColumn in a datagrid. The DataField must be created using
the Session("culture") value. Shoudn't this work?

<asp:BoundColumn DataField='<% "title_" & Session("culture")
%>'></asp:BoundColumn>

What is wrong?

Thanks,
Miguel

Nov 19 '05 #2
BoundColumn is used to show data from data source. It should be

<asp:BoundColumn DataField="Data_Source_Field_Name"></asp:BoundColumn>

HTH

Elton Wang

"Shapper" wrote:
Hello,

I have a BoundColumn in a datagrid. The DataField must be created using
the Session("culture") value. Shoudn't this work?

<asp:BoundColumn DataField='<% "title_" & Session("culture")
%>'></asp:BoundColumn>

What is wrong?

Thanks,
Miguel

Nov 19 '05 #3
Yes I know.

But the field name in my case changes with culture.

So, for example, when culture is en-GB I want to use the field
title_en-GB

Cheers,
Miguel

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:El****@discussions.microsoft.com:
BoundColumn is used to show data from data source. It should be

<asp:BoundColumn DataField="Data_Source_Field_Name"></asp:BoundColumn>

HTH

Elton Wang

"Shapper" wrote:

Hello,

I have a BoundColumn in a datagrid. The DataField must be created using
the Session("culture") value. Shoudn't this work?

<asp:BoundColumn DataField='<% "title_" & Session("culture")
%>'></asp:BoundColumn>

What is wrong?

Thanks,
Miguel


Nov 19 '05 #4
In that case, it's better to use TemplateColumn, and in ItemDataBound event
assign data.

"Shapper" wrote:
Yes I know.

But the field name in my case changes with culture.

So, for example, when culture is en-GB I want to use the field
title_en-GB

Cheers,
Miguel

"Elton W" <El****@discussions.microsoft.com> wrote in message
news:El****@discussions.microsoft.com:
BoundColumn is used to show data from data source. It should be

<asp:BoundColumn DataField="Data_Source_Field_Name"></asp:BoundColumn>

HTH

Elton Wang

"Shapper" wrote:

Hello,

I have a BoundColumn in a datagrid. The DataField must be created using
the Session("culture") value. Shoudn't this work?

<asp:BoundColumn DataField='<% "title_" & Session("culture")
%>'></asp:BoundColumn>

What is wrong?

Thanks,
Miguel


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: learningGuy | last post by:
Can someone tell me what is wrong with this simple code? I get an exception every time at the myFile.Open() line. I have included the code that I think is needed to for you to answer this below:...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
1
by: Qiangning Hong | last post by:
I decide to seperate my data collection routine from my data analysis and storage program to a seperate process, so I try to use the new subprocess model in Python 2.4. The main program spawns...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
51
by: WindAndWaves | last post by:
Can anyone tell me what is wrong with the goto command. I noticed it is one of those NEVER USE. I can understand that it may lead to confusing code, but I often use it like this: is this...
15
by: ben | last post by:
this programme from sedgewick's 'algorithms in c parts 1-4' "is a sample client program that ... uses a symbol table to find the distinct values in a sequence of keys (randomly generated or read...
10
by: Enkidu | last post by:
Beginner question, sorry! I am using indexers to access an array of StringBuilders in an instance of a class: Getting: value = board1; Setting: board1 = value1 ;
6
by: Kid Programmer | last post by:
Hello guys. I have a question. What's wrong with my compiler. In a simple number averaging program in a GUI window have way into the project I compile the program and I get the following errors: ...
4
by: hirsh.dan | last post by:
i have a functions that writes information to a file. inside that function i have a line in which i call another function. if this line is executed, nothing is written to the file, but if i remark...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
1
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...
0
tracyyun
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...
0
agi2029
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,...
1
isladogs
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.