update redirection ASP .net - asp.net

I a problem with my site..
There is a logo in my site thats redirect to the Home page.
The problem is that if for example i'm in page www.domain.com/about and I press the logo - everything fine and it goes to www.domain.com/Main, but if i'm in page www.domain.com/page/125 It's redirect me to www.domain.com/page/Main instead of www.domain.com/Main.
I have all the site files. which file I should change?
Is it the sitemap?
(I have no page name page or 125...)
Thanks!

Without knowing how your project is structured or if you're using WebForms or MVC, it's difficult for the StackOverflow community to help you. Please update your question with more details if the below suggestion doesn't help or apply.
If you're using using WebForms with MasterPage and content pages, the logo is usually in the MasterPage e.g. Site.Master
Try and find something like this in your Site.Master
<img src="logo.gif"/>
and replace it with this
<img src="logo.gif"/>
or this
<a runat="server" href="Main"><img src="logo.gif"/></a>

Related

redirecting a page from asp to aspx

I was assigned a project I'm having some difficulty finding a solution or guide to, we have a asp shopping cart that currently runs in a classic asp page, we want to redirect once they click "checkout" to redirect to our newer aspx page.
any help is greatly appreciated.
edit:
I have tried to simply do a redirect to the website giving it the information that it needs like order id, date, etc. however this method gives me an error with the web.config on the asp side. involving our target framework 4.5.2.
I am extremely new to web programming and this is my first non fix bug x issue.
If I understood your question correctly, you just need to put your destination page address in your action parameter in the original page <form> tag.
<form action="./destination_page.aspx">
<!-- page content -->
</form>

Writing a URL in webforms

I have inherited a project written in .net webforms, basically just an old site that needed to be skinned/made responsive. All of that is done and functions as it should. However I noticed that the old version of the site didn't contain a 404 page, something that I feel is necessary for this site. I've made a 404 page but what I want to do is display the URL on the page. So it'd be something like
<div>
<h1>Something went wrong with</h1>
<h2>Page URL here</h2>
</div>
I know in MVC.net you can write http://www.domainname.com#(Request.QueryString["aspxerrorpath"]
but whats the equivalent in webforms?
FYI the "backend" of each page is written in VB
Thanks in advance
I originally misread your question and advised Server Variables for "URL", then realised you're on a custom error page, so it would just show the URL you're on.
Perhaps you can use the Referring page?
<%=Request.ServerVariables["HTTP_REFERER"]%>
Additional info
ASP.NET aspxerrorpath in URL

MVC Routing Structure and SEO friendly URLs

I have a MVC project that has a number of views in the Views/Home folder to which are currently accessed as /Home/About, /Home/Contact, etc... but these are summary pages with multiple content sections on each page.
I need to link to an View/Home/Content.cshtml page to show the linked summary page in its entirety.
I'd link to replace /Home/About with /About and say the linked page as /About/Overview as opposed to /Home/Account/Content/1 is this possible?
If so could somebody please explain how I need to format ActionLink's accordingly and anything else I need to configure in the project.
Any help would be much appreciated :-)

Web Analytics and Content Reuse

We have created a button template where an editor can associate a web analytic tag with it. The issue is we would like to reuse this button component on the same page but still be able to differentiate where on the page it is coming from.
Has someone encountered this issue before? We're looking for some insight into the problem and perhaps some ways to solve this without modifying the template.
FYI, we are using Tridion 2009 SP1.
Thanks!
Updated with HTML
<a href ="/security.jsp" onClick="trackCustomLink('tttt:p:apply-now','Link','onClick');">
<img src="/images/GICs/applynow-button.gif" border="0" alt="Apply Now" /></a>
Assuming your button is rendered with a component template, it seems like you need to just use the Ordinal Position of the component on the page - Can you specify what kind of templates you are using (VBScript or Modular with DWT or C#)? Base on that we may be able to give you some code samples.
Graham bird has a good article about OrdinalPosition with VBScript at: http://www.grahambird.co.uk/2011/01/ordinalposition/
The idea behind this is that you add the ComponentPresentation.OrdinalPosition value to your analytics code.

To move to a certain part of a page using anchor tag...read the description please

I'm using the following code to move to this part of the page:
.
.
.<a title="news" name="news"></a>
.
.
But when I access or REDIRECTS from another page to this page using the URL like: http://localhost/mypage.aspx#news, the page goes to that part and again comes at the top of the page automatically changing the URL to http://localhost/mypage.aspx#.
There is no manually written javascript on page load in my code. The code does uses AJAX, UpdatePanel etc.
What could be the other possible reasons?
Any help appreciated.
Are you absolutely sure there is no javascript? You've tagged the question asp.net - maybe the framework adds some javascript to the rendered page?
If the MaintainScrollPositionOnPostback directive is set on the page, it might cause the behavior described in the question. Is this property set on the page? Or maybe on a master page?

Resources