473,811 Members | 3,314 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:__d oPostBack('Form at1','')".
(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.Outpu tStream.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:__d oPostBack('Form at1','PN1005_SN 2465')" where the
'PN1005_SN2465' is the unique part and serial number identifying my item and
the user still only sees a link to "Format1.tx t" 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:LinkButt on ...> 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 1943
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****@communi ty.nospam" <th************ *******@discuss ions.microsoft. com>
wrote in message news:71******** *************** ***********@mic rosoft.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:__d oPostBack('Form at1','')". (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.Outpu tStream.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:__d oPostBack('Form at1','PN1005_SN 2465')" where the 'PN1005_SN2465' is the unique part and serial number identifying my item and the user still only sees a link to "Format1.tx t" 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:LinkButt on ...> 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
1482
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 accessible (can I read it) with ASP? Is it updateable (can I add new links to the list) with ASP?
2
5063
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 visited and changes the color of the link, but I would like to change the background of each row that has been visited. Is there a way to read the visited status of a link using JavaScript?
0
954
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 the name) and others of these files (for historical/hysterical reasons) always have the same name. Basically, all of these files are generated from a database and provide the information in various formats. The problem is that on this last...
2
1657
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 hover the mouse over the link button control, I can see the custom javascript in the browser's status bar. It puts a wrapper around the usual __doPostBack function call. Is this wrapper causing IE to get confused as to the visited status of the...
9
5559
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. But the "app.MainLoop()" in wxpython looks like conflicting with the "while 1:" in socket server. After I commented the "app.MainLoop()", everything is working except two things: 1. if I click anywhere on the screen with the mouse, the image is...
130
6651
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 in the database show up with *15* decimal places and are ever so slightly off (in the example in the subject line, by about 2E-15). I'm not doing any operations on this column. It's just running a stored procedure which performs a pretty basic...
1
1619
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 then it should be like as home->about_us.htm->contact_us.htm Suggest me how can i get it. I have allready posted it in JavaScript forum, but now i need to do it through PHP.
1
3815
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 properties alt in img tag istead of picture . place of the pictures is saved in the database(my database is with mysql) and in home page i fetch properties of the product and address of place that pictures is located output of the code in the...
0
9731
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
9605
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,...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
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...
1
7671
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
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
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.