Hyperlink column on ASP.NET Grid issue

G

Guest

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.
 
G

Guest

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.
 
J

JohnH

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.
 
G

Guest

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.
 
J

JohnH

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.
 
G

Guest

Here are the href values as seen by the browser.
I am displaying 50 rows per page.
1st page:
href="javascript:__doPostBack('Resellers$ctl03$ResellerLink','')" to
href="javascript:__doPostBack('Resellers$ctl52$ResellerLink','')"

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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top