3

I have a website with a page that does a crosspage postback using an ASP:Button with a PostBackUrl as such:

<asp:Button ID="FindButton" runat="server" Text="Find" CssClass="button" PostBackUrl="~/TGS/BusinessResults.aspx"  meta:resourcekey="FindButtonResource1" />

I do not need information about the previous page other than PreviousPage.IsCrossPagePostBack, so adding a PreviousPageType should not be neccesary.

Problem I have two machines, one laptop and one desktop. My code works as intended (PreviousPage is not null) on the laptop, but PreviousPage is always null on my desktop with identicical code.

I have the same Visual Studio 2010 installations with the same .NET versions (Used System.Environment.Version to check) on both machines.

Any thoughts?

Edit: as an update, this is no longer neccesary - I fixed my issue (which doesn't really have much to do with this) in a different matter - but as always; i'll include my solution:

I was using some Response.Write to write a loading gif to a website while the actual page loaded, and this messed up some form related things.. I included a base target to the header of the loading gif html and that solved my problem of all links opening in new images.

bech
  • 627
  • 5
  • 22
  • The `PostBackUrl` is a different url than the current page's url? You're not handling `FindButton`'s click event in this page? C# or VB.NET? Can you show more of your page, at least the page directive. – Tim Schmelter May 10 '12 at 11:36
  • Yes - it is. As for the click event, I have added a small gif loader that will show while it loads (the target page is an iframe) - I have also tried without as I read it could cause problems, but no difference. Page directive is as such: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BusinessCriteria.aspx.cs" Inherits="Website.TGS.BusinessCriteria" %> But as mentioned in the topic, I don't think the problem lies in the code, moreso in the environment. – bech May 10 '12 at 12:51

1 Answers1

1

A null PreviousPage can be caused by a transfer that might be induced through an intervening Web proxy or perhaps a caching appliance inline with the desktop, but not the laptop. I'd pull a Net Monitor and/or ProcMon trace to see if anything like this might be at play. Hope that helps in some way.

David W
  • 10,062
  • 34
  • 60
  • Hi, thanks for your suggestion. I'm a little confused as to how to approach this; I'm running my website through the Azure Dev Fabric, so I'm a little confused as to what process to monitor. Any chance you're familiar with the scenario? – bech May 10 '12 at 13:48
  • Unfortunately, no...I've not dealt with Azure, so I have to plead ignorance there. Sorry :( – David W May 10 '12 at 13:55
  • Fair enough - I'll try various processes. Any hints on what to look for in the messages that would indicate a transfer? – bech May 10 '12 at 14:08