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

How to make Linkbuttons show visited status accurately?

I have a page that I get to by selecting the part number and serial number of
an item in my database. The pages then generates a set of files. Some of
these files have unique names (containing part/serial data within the name)
and others of these files (for historical/hysterical reasons) always have the
same name (regardless of which item they are for). Basically, all of these
files are generated from the database and provide the information in various
formats.

The problem is that on this last page, once I have visited the links
(displayed the files) for one item (part and serial), that link always shows
as
"visited"--even for other items.

I am using ASP.NET and using a "LinkButton" to generate the links. So, what
the browser sees is something like: "javascript:__doPostBack('Format1','')".
(Where "Format1" is the "id" of the LinkButton.). So, is there a way I can
get the Part and Serial number into some text somewhere so that the browser
recognizes the link as different when it is pointing to a file that really is
different?

The fact of the matter is that on the server, the file is given a name with
the part and serial number appended to the name and then downloaded with
"Response.OutputStream.Write" and set up so the client only sees the base
file name. (Really cool, BTW!--except that the links have this problem with
"visited" status being wrong).

To summarize, I want the displayed LinkButton (as seen by the browser) to be
something like "javascript:__doPostBack('Format1','PN1005_SN2465' )" where the
'PN1005_SN2465' is the unique part and serial number identifying my item and
the user still only sees a link to "Format1.txt" or some such. Is there a
way to make that work? I've tried putting commented stuff into the link text
setting other attributes of the <asp:LinkButton ...> tag to contain the part
and serial number but one way or another, it never worked. Ideas?
Suggestions?

Thanks in advance!!

Lowell

Nov 19 '05 #1
1 1916
The easy way would be to use a Hyperlink instead of a LinkButton. Setup a
separate page do the file access / generation, and then link to it from your
main product page. In this way, you can avoid the javascript-based Urls and
make them as distinct as you want for the browser's benefit.

So your actual linked Url would be something like;

http://yoursite.com/products/file1.a...=PN1005_SN2465

By playing with the querystring, you get the precise degree of Url namespace
control you want.

You might also look at "Url rewriting" as a technique to make the individual
Urls unique and more aesthetic, as in;

http://yoursite.com/products/PN1005_SN2465.aspx

/// M
"th****@community.nospam" <th*******************@discussions.microsoft.com >
wrote in message news:71**********************************@microsof t.com...
I have a page that I get to by selecting the part number and serial number of an item in my database. The pages then generates a set of files. Some of these files have unique names (containing part/serial data within the name) and others of these files (for historical/hysterical reasons) always have the same name (regardless of which item they are for). Basically, all of these files are generated from the database and provide the information in various formats.

The problem is that on this last page, once I have visited the links
(displayed the files) for one item (part and serial), that link always shows as
"visited"--even for other items.

I am using ASP.NET and using a "LinkButton" to generate the links. So, what the browser sees is something like: "javascript:__doPostBack('Format1','')". (Where "Format1" is the "id" of the LinkButton.). So, is there a way I can get the Part and Serial number into some text somewhere so that the browser recognizes the link as different when it is pointing to a file that really is different?

The fact of the matter is that on the server, the file is given a name with the part and serial number appended to the name and then downloaded with
"Response.OutputStream.Write" and set up so the client only sees the base
file name. (Really cool, BTW!--except that the links have this problem with "visited" status being wrong).

To summarize, I want the displayed LinkButton (as seen by the browser) to be something like "javascript:__doPostBack('Format1','PN1005_SN2465' )" where the 'PN1005_SN2465' is the unique part and serial number identifying my item and the user still only sees a link to "Format1.txt" or some such. Is there a
way to make that work? I've tried putting commented stuff into the link text setting other attributes of the <asp:LinkButton ...> tag to contain the part and serial number but one way or another, it never worked. Ideas?
Suggestions?

Thanks in advance!!

Lowell

Nov 19 '05 #2

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

Similar topics

6
by: - jes | last post by:
Greetings. Using CSS, a programmer can set the color for an href link and a different color for a VISITED href link. Anyone know where this "list" of visited links is stored? Is it...
2
by: joeandtel | last post by:
Is there a way to check if a link has been visited using JavaScript? I have a table of data and the front of each row has a link to another page. Of course the browser knows if a link has been...
0
by: theyas | last post by:
I have a page that I get to by selecting a part number and serial number of an object which then generates a set of files. Some of these files have unique names (containing part/serial data within...
2
by: Dot net work | last post by:
I have a 3rd party link button control that when clicked does not retain it's visited color status on postback. (Actually, the first control on the form does, but all others do not.) When I...
9
by: zxo102 | last post by:
Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame....
130
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places...
1
kamill
by: kamill | last post by:
How can i show the path of visited links on each page, suppose from home page i have visited about_us then it should be as below home->about_us.htm Then suppose i have visited to contact_us.htm...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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,...

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.