473,399 Members | 3,832 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,399 software developers and data experts.

Hyperlink column

I have a datagrid with a hyperlink column. So I can specify only one
NavigationUrl to all rows. How can I get an Id to the target Url, beeing
able to display different data records an a more detailed page?

--
Sleepless in Berlin
W. Schwenkner
Nov 19 '05 #1
8 1295
Look at the DataBinder.Eval method to manipulate the data held in your
dataset as its bound.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Wernfried Schwenkner" <we**************@schwenkner.de> wrote in message
news:MPG.1c797e52b2bb37e19896bd@merlin...
I have a datagrid with a hyperlink column. So I can specify only one
NavigationUrl to all rows. How can I get an Id to the target Url, beeing
able to display different data records an a more detailed page?

--
Sleepless in Berlin
W. Schwenkner

Nov 19 '05 #2
In article <eF**************@TK2MSFTNGP09.phx.gbl>,
ti*****@despammed.com says...
Look at the DataBinder.Eval method to manipulate the data held in your
dataset as its bound.


Thanks, I could manage this.

But now it seems to be better to pass the Id from the grid page to the
detail page by a session variable. How can this be done?
--
Sleepless in Berlin
W. Schwenkner
Nov 19 '05 #3
Wernfried Schwenkner wrote:
I have a datagrid with a hyperlink column. So I can specify only one
NavigationUrl to all rows. How can I get an Id to the target Url,
beeing able to display different data records an a more detailed page?


Use the HyperlinkColumn's DataNavigateUrlFormatString property.

For instance:
DataNavigateUrlFormatString="targetpage.aspx?ID={0 }"
DataNavigateUrlField="ID"

The ID will be inserted at the place of the {0} mark.

In the detail page, retrieve your ID with:
Request.QueryString("ID")

--

Riki
Nov 19 '05 #4
Try this

In page1.aspx code:
Session["MyDataSet" + Session.SessionId] = dsObject;

In page2.aspx code:
Dataset dsObject = Session["MyDataSet" + Session.SessionId];
if (null != dsObject)
{
// Do something with the dataset.
}

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Wernfried Schwenkner" <we**************@schwenkner.de> wrote in message
news:MPG.1c79a3f08aa41ceb9896be@merlin...
In article <eF**************@TK2MSFTNGP09.phx.gbl>,
ti*****@despammed.com says...
Look at the DataBinder.Eval method to manipulate the data held in your
dataset as its bound.


Thanks, I could manage this.

But now it seems to be better to pass the Id from the grid page to the
detail page by a session variable. How can this be done?
--
Sleepless in Berlin
W. Schwenkner

Nov 19 '05 #5
In article <OK**************@TK2MSFTNGP10.phx.gbl>,
ti*****@despammed.com says...
Try this

In page1.aspx code:
Session["MyDataSet" + Session.SessionId] = dsObject;

In page2.aspx code:
Dataset dsObject = Session["MyDataSet" + Session.SessionId];
if (null != dsObject)
{
// Do something with the dataset.
}


Sorry, if I didn't explain it very well. I know how to pass a variable
from page to page with the Session-property.

My problem is, in the datagrid of page 1 I have a link button which
navigates to page 2. When clicking this, the Id shall be inserted into
the session property. How can this be done?

--
Sleepless in Berlin
W. Schwenkner
Nov 19 '05 #6
In article <OK**************@TK2MSFTNGP10.phx.gbl>,
ti*****@despammed.com says...
Try this

In page1.aspx code:
Session["MyDataSet" + Session.SessionId] = dsObject;

In page2.aspx code:
Dataset dsObject = Session["MyDataSet" + Session.SessionId];
if (null != dsObject)
{
// Do something with the dataset.
}


Sorry, if I didn't explain it very well. I know how to pass a variable
from page to page with the Session-property.

My problem is, in the datagrid of page 1 I have a link button which
navigates to page 2. When clicking this, the Id shall be inserted into
the session property. How can this be done?

--
Sleepless in Berlin
W. Schwenkner
Nov 19 '05 #7
as Riki explains, add it to the URL DataNavigateUrlField as the data binds
and retrieve it on page load at the recipient page following a click - stick
it in the session then. You could also use the eval method to load it into
session as the first page loads so its already there before your click
occurs.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Wernfried Schwenkner" <we**************@schwenkner.de> wrote in message
news:MPG.1c7b0f6688ce39fe9896c4@merlin...
In article <OK**************@TK2MSFTNGP10.phx.gbl>,
ti*****@despammed.com says...
Try this

In page1.aspx code:
Session["MyDataSet" + Session.SessionId] = dsObject;

In page2.aspx code:
Dataset dsObject = Session["MyDataSet" + Session.SessionId];
if (null != dsObject)
{
// Do something with the dataset.
}


Sorry, if I didn't explain it very well. I know how to pass a variable
from page to page with the Session-property.

My problem is, in the datagrid of page 1 I have a link button which
navigates to page 2. When clicking this, the Id shall be inserted into
the session property. How can this be done?

--
Sleepless in Berlin
W. Schwenkner

Nov 19 '05 #8
as Riki explains, add it to the URL DataNavigateUrlField as the data binds
and retrieve it on page load at the recipient page following a click - stick
it in the session then. You could also use the eval method to load it into
session as the first page loads so its already there before your click
occurs.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Wernfried Schwenkner" <we**************@schwenkner.de> wrote in message
news:MPG.1c7b0f6688ce39fe9896c4@merlin...
In article <OK**************@TK2MSFTNGP10.phx.gbl>,
ti*****@despammed.com says...
Try this

In page1.aspx code:
Session["MyDataSet" + Session.SessionId] = dsObject;

In page2.aspx code:
Dataset dsObject = Session["MyDataSet" + Session.SessionId];
if (null != dsObject)
{
// Do something with the dataset.
}


Sorry, if I didn't explain it very well. I know how to pass a variable
from page to page with the Session-property.

My problem is, in the datagrid of page 1 I have a link button which
navigates to page 2. When clicking this, the Id shall be inserted into
the session property. How can this be done?

--
Sleepless in Berlin
W. Schwenkner

Nov 19 '05 #9

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

Similar topics

2
by: damonf | last post by:
I'm currently trying to add an ASP hyperlink to a template column in a datagrid. The normal hyperlink column doesn't give me the ability to add attributes to the item. In my grid there are four...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
2
by: Jason | last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a class that extracts the link from an XML Document. How can I populate the hyperlink column in the data grid with the...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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...
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,...
0
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...

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.