473,322 Members | 1,259 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,322 software developers and data experts.

C# <ItemTemplate> and passing variables...

Hi !
How do I access the following spillerID and Session["Session_player"] from
another *aspx page in my application?

<ItemTemplate>
<a href="player_details.aspx?spillerID=<%#
DataBinder.Eval(Container.DataItem, "PlayerID") %>"
target="_parent"> <%# DataBinder.Eval(Container.DataItem,
"playerFirstName") %>
<%#
DataBinder.Eval(Container.DataItem, "playerLastName") %>
</a>
<%# Session["Session_player"] = DataBinder.Eval(Container.DataItem,
"playerID") %>
</ItemTemplate>

I want to show additional informations about the player when the link is
beeing clicked.

Any suggestions on where to learn/read more about the behaviour of these
variables.

R./jp


Nov 18 '05 #1
1 4512
Jesper, let me recommend that you read my running series on the DataGrid:

An Extensive Examination of the DataGrid Web Control
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx

The URL above starts at Part 1. By Part 3 you'll be building a demo
that does (I believe) exactly what you want. The one downside is that
the article I have authored focuses in on VB.NET, but VB.NET and C# are
really the same thing, just some differences in the syntax is all.

I also have a 350+ page book that focuses exclusively on the DataGrid,
DataList, and Repeater:

ASP.NET Data Web Controls Kick Start
http://www.4guysfromrolla.com/webtech/chapters/ASPDWC/

hth
Jesper Pedersen wrote:
Hi !
How do I access the following spillerID and Session["Session_player"] from
another *aspx page in my application?

<ItemTemplate>
<a href="player_details.aspx?spillerID=<%#
DataBinder.Eval(Container.DataItem, "PlayerID") %>"
target="_parent"> <%# DataBinder.Eval(Container.DataItem,
"playerFirstName") %>
<%#
DataBinder.Eval(Container.DataItem, "playerLastName") %>
</a>
<%# Session["Session_player"] = DataBinder.Eval(Container.DataItem,
"playerID") %>
</ItemTemplate>

I want to show additional informations about the player when the link is
beeing clicked.

Any suggestions on where to learn/read more about the behaviour of these
variables.

R./jp

--

Scott Mitchell
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
Nov 18 '05 #2

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

Similar topics

0
by: Andla Rand | last post by:
Hi, I would like to use this feature but in the codebehind. I'm reading from an example text and everything is not codebehind. I would appreciate if you could help me on this. <form...
3
by: Ben Becker | last post by:
I am trying to build a custom crosstab type of grid where I take some items in a data grid and based on the content of the current item compared to the previous item, determine if a new row in a...
4
by: z. f. | last post by:
Hi, I'm having an aspx page with a server form. i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
4
by: Satya | last post by:
Hi all, The following code is throwing a run time error "The server tag is not well formed. " <ItemTemplate> <asp:HyperLink Runat="server" ID="lnkFile"...
3
by: webserverpete | last post by:
I would like to have multiple <td> in a repeater control. The below code does not work: <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" DataMember="DefaultView">...
3
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed...
3
by: Opa | last post by:
Hi, I have and XMLDataSource which I am using in a GridView control and am customizing the grid with <ItemTemplate>. My XML datasource has an element with an attribute called "private". I want...
5
by: Jim in Arizona | last post by:
How do I find a control within a datalist itemtemplate from a sub procedure that isn't a normal called procedure from a datalist (like the update, edit, or cancel procedures)? For instance,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.