473,769 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_de tails.aspx?spil lerID=<%#
DataBinder.Eval (Container.Data Item, "PlayerID") %>"
target="_parent "> <%# DataBinder.Eval (Container.Data Item,
"playerFirstNam e") %>
<%#
DataBinder.Eval (Container.Data Item, "playerLastName ") %>
</a>
<%# Session["Session_player "] = DataBinder.Eval (Container.Data Item,
"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 4544
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_de tails.aspx?spil lerID=<%#
DataBinder.Eval (Container.Data Item, "PlayerID") %>"
target="_parent "> <%# DataBinder.Eval (Container.Data Item,
"playerFirstNam e") %>
<%#
DataBinder.Eval (Container.Data Item, "playerLastName ") %>
</a>
<%# Session["Session_player "] = DataBinder.Eval (Container.Data Item,
"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******@4guysf romrolla.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
1701
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 runat=server> <asp:DataList id="MyDataList" runat="server" BorderColor="black"
3
2055
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 table should be created or not. In order to do this, I need to have full control over the conditional logic for how items get displayed within a repeater element which I'm not seeing as possible. How can I cursor through a data set, apply...
4
2287
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 lower area of the form. on the lower area i have validators for validating input.
4
2016
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 reply make sure your suggestion actually works. like a <asp:button> control have a CausesValidation property that allows it to POST a button command event to the server without causing the page to make validation on form inputs, i need to get the...
4
2218
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" NavigateUrl="javascript:OpenImage('<%# DataBinder.Eval(Container.DataItem,"FileName") %>');"><%#
3
2779
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"> <HeaderTemplate> <table> </HeaderTemplate> <tr> <ItemTemplate> <td>
3
2766
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 into a <xml> document but not sure which direction to take. Is there perhaps a starter document which uses sql server as the data source I can tap into.
3
2947
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 to check the value of the private attribute and if is is true, I DON'T want to display this row of data. I am having trouble with the XPath expression. How is this done? Here is a sample XML source
5
12904
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, normally you find a control and access it's properties and methods, like so: Sub Update(ByVal sender As Object, ByVal e As DataListCommandEventArgs) Dim txtPosted As New TextBox
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6673
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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 we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.