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

Hyperlink in ASP to another aspx page

88
Hi,

I'm very new to ASP, and I have been thrown into updating a website that was already written in ASP and pushing it to the web for the first time.

So far, with my old knowledge of html and my somewhat understanding of ASP I've been able to make the updates, but the menu (which is done in JavaScript) is not displaying at all.

I checked the links to the external javascript (.js) files, double checked that the files were in the proper folders, But it still won't work.

So I was just going to scrap that menu (since I don't understand how it works) and just manually put the links on the pages for the time being.

I started with an HTML link and linked it to the "About US" page (it is an aspx page) but when the link is clicked it pops up a download dialog box asking whether you want to open or download it. So I changed it from a regular HTML hyperlink tag to an ASP tag, and now it doesn't do anything at all.

Please help me! I'm soooooooooooo lost.

Here is my code for the link.

<asp:hyperlink runat="server" navigateurl='./App_Templates/Narrative%20About%20Us.aspx'>About Us</asp:hyperlink>
May 23 '07 #1
6 2716
AricC
1,892 Expert 1GB
Hi,

I'm very new to ASP, and I have been thrown into updating a website that was already written in ASP and pushing it to the web for the first time.

So far, with my old knowledge of html and my somewhat understanding of ASP I've been able to make the updates, but the menu (which is done in JavaScript) is not displaying at all.

I checked the links to the external javascript (.js) files, double checked that the files were in the proper folders, But it still won't work.

So I was just going to scrap that menu (since I don't understand how it works) and just manually put the links on the pages for the time being.

I started with an HTML link and linked it to the "About US" page (it is an aspx page) but when the link is clicked it pops up a download dialog box asking whether you want to open or download it. So I changed it from a regular HTML hyperlink tag to an ASP tag, and now it doesn't do anything at all.

Please help me! I'm soooooooooooo lost.

Here is my code for the link.

<asp:hyperlink runat="server" navigateurl='./App_Templates/Narrative%20About%20Us.aspx'>About Us</asp:hyperlink>
If you are doing the site in HTML why don't you just use the usual anchor tag <a href="somesite.com">Go To Some Site</a>? That looks like a .net link to me.
May 24 '07 #2
fperri
88
If you are doing the site in HTML why don't you just use the usual anchor tag <a href="somesite.com">Go To Some Site</a>? That looks like a .net link to me.
The site is in ASP.net, all the web pages have a .aspx extension.

I got the links in there now, but I don't understand why - when you click on them, instead of it opeining and displaying the page, it pops up a download box.

It does this on all my links. But the default.aspx page displays fine.

~ Franccesca
May 24 '07 #3
jhardman
3,406 Expert 2GB
Aric's right. I'm sure the <asp:hyperlink> tag isn't interpreted because the browser has no idea what it should do. change it to:
[html]<a href="/app_templates/narrative%20about%20us.aspx">About Us</a>[/html]

Jared
May 24 '07 #4
fperri
88
Aric's right. I'm sure the <asp:hyperlink> tag isn't interpreted because the browser has no idea what it should do. change it to:
[html]<a href="/app_templates/narrative%20about%20us.aspx">About Us</a>[/html]

Jared
Ok, I changed the link to HTML. It now is displaying just the narrative text of the page - it doesn't apply the ASP template at all.

Here is what the browser displays now (Exactly as you see it here):
__________________________________________________ ______________




<%@ Page Language="C#" MasterPageFile="~/App_Templates/Narrative.master" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



<p>Intro here ....... p>

<b>Timelines</b></br>
<p>Gaining valuable insignt into .......bla bla bla.</p>

<b>Accuracy & Integrity</b></br>
<p>Attention to detail ..bla bla bla....</p>

<b>Competitive Connections</b></br>
<p>.bla bla bla......</p>

<a href="#">Click here for a list of our products.</a>

</asp:Content>



__________________________________________________ ______________
And now I'm even more confused........why does is say C# as the language at the top of the page when I was told the site was done in ASP?

I must sound like a moron :P

I'm sorry, I literally got thown into this without ever coding anything for the web except HTML and javascript rollovers. They hired me to code VB, not ASP. I'm usually ok with doing changes to other people's work, but I don't believe this was ever actually tested live? I mean, the company has never used it - they hired an outside web design company to design it for them. I should have been able to just change the text between the HTML tags, push it to the web and have it work right? Am I mising some configuration file that I didn't FTP over or is there a setting that my host needs? I'm soooooooooooo frustrated.
May 28 '07 #5
jhardman
3,406 Expert 2GB
Ahh. It looks like this was coded in asp.net which can actually use several different languages. (Microsoft decided to change asp over to be part of its .net package, The original asp was strictly coded in vbscript which was very easy for VBers to write.) Anyway, it looks like your server might not understand vb.net (I'm sure I don't understand it that well, but it invloves several files and compilation to binary at one point). Anyway, I'm sorry I'm not much help, but you might want to check with the .net forum to see if they have any ideas.

Jared
May 28 '07 #6
fperri
88
Thanks, I was thinking that its got to be something with our host's server. I'm going to have to give them a call.

~ Franccesca
Jun 4 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below...
1
by: mschoup | last post by:
I have a simple aspx page(WebForm1.aspx) with a HyperLink, LinkButton, and two CheckBoxes. When I select a CheckBox and then click the LinkButton, the CheckBox retains state. When I select the...
4
by: wrytat | last post by:
I have a form with a textbox for the user to enter a quantity and another textbox for the delivery date. I disabled this delivery date textbox such that the user has to press a calendar link next...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
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: 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:
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...
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
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...
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.