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

Hyperlink column on ASP.NET Grid issue

GK
I have an ASP.NET web application (version 1.1,VS 2003), running on Windows
XP Professional, SP2.
Many of the pages use ASP.NET Grid Control, with pagination.
One of the columns of this Grid is a Template column (Link Button).
Assume that there are more than one page of data displayed on the Grid.
User clicks on the first row hyper link on the Grid on the first page, then
the first row hyper link color changes to look as "visited".
Then the user navigates to a different page number on the Grid by clicking
on the page number (say 2).
Then on the 2nd page, the color of first row hyper link on the Grid is
automatically changed to look as visited even though he is navigating to the
page number 2 for the first time.
Users would expect the hyper links on the 2nd (or any other ) page should
look like not visited, when they are navigating for the first time and not
yet clicked on the hyper link.
Any help in resolving this issue is appreciated.
May 12 '06 #1
6 2844
What is the url that these links are posting to?

May 12 '06 #2
GK
The hyperlinks are used to populate the data to the fields above the grid
from the selected row on the grid, so that users can edit. On click of the
hyperlink, data in the selected row is captured in code behind file and
populated on to the respective fields on the page.

"JohnH" wrote:
What is the url that these links are posting to?

May 12 '06 #3
I believe the style for a visited link is set based on the text of the
URL that it points to. If the url that is constructed for the postback
is using the row number in the visible part of the grid (i.e., row 1
will always have the same URL regardless of which page is visible),
then you're stuck.

Do you want visited links in a different style? Usually, I set all my
linkbuttons to a style that doesn't differentiate visited links.

John H.

May 13 '06 #4
GK
Yes,
I wanted the visited links to look differently, so I am setting the visited
link color to a different color than the one which is not visited, through
style sheet.

"JohnH" wrote:
I believe the style for a visited link is set based on the text of the
URL that it points to. If the url that is constructed for the postback
is using the row number in the visible part of the grid (i.e., row 1
will always have the same URL regardless of which page is visible),
then you're stuck.

Do you want visited links in a different style? Usually, I set all my
linkbuttons to a style that doesn't differentiate visited links.

John H.

May 15 '06 #5
Then I believe you'll need to manipulate the URL that the links point
to and make sure that it is unique across different pages of the
datagrid. Can you post the actual URL content (i.e., what the browser
sees for each row in the datagrid)? Then I might be able to offer a
more concrete suggestion for reformatting it.

John H.

May 15 '06 #6
GK
Here are the href values as seen by the browser.
I am displaying 50 rows per page.
1st page:
href="javascript:__doPostBack('Resellers$ctl03$Res ellerLink','')" to
href="javascript:__doPostBack('Resellers$ctl52$Res ellerLink','')"

2nd page:
href="javascript:__doPostBack('Resellers$ctl03$Res ellerLink','') to
href="javascript:__doPostBack('Resellers$ctl52$Res ellerLink','')"

and similar values on other pages also.
One thing is sure that the value displayed to the user with these hyperlinks
are different from page to page, like the 1st item on page one is not the
same as first item on page 2 and so on.

"JohnH" wrote:
Then I believe you'll need to manipulate the URL that the links point
to and make sure that it is unique across different pages of the
datagrid. Can you post the actual URL content (i.e., what the browser
sees for each row in the datagrid)? Then I might be able to offer a
more concrete suggestion for reformatting it.

John H.

May 16 '06 #7

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

Similar topics

0
by: Rudolph Araujo | last post by:
Hi, I needed to build a data grid in which the first column has hyperlinks rather than simple text. I found the following code on this newsgroup and it works fine except for one problem. When I...
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...
1
by: Cezar | last post by:
Hello, Is it possible to create a special style just for one column of the grid. I want to display in Bold the values of a column. Also, for a column, I want to create hyperlinks only for some...
2
by: klynn | last post by:
I need to create a datagrid dynamically and add a hyperlink onto one of the columns. So the user sees that columns value and can click on it. But the hyperlink sends a value from another column...
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 =...
1
by: Greg Reynolds | last post by:
Hi, I need to create datagrid hyperlink columns with multiple parameters in the URL. In my research on how to do this, it is recommended to create a template column which I have done. The code...
6
by: epigram | last post by:
I'm using the DataGrid with AutoGenerateColumns set to false and choosing which columns I want in the grid by using the <Columns> attribute. What I want to do is to create a hyperlink out of one...
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...
5
by: CSharpguy | last post by:
How can I create a hyperlink in a datagrid were I'm autogenerating the columns? I need to have a link to the document listed in the grid.
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.