views:

370

answers:

1

Hi All,

I am really confused about this one. I have some code that runs fine on my development server but I am now trying to get the site working on the sales guys new laptop. None of the image buttons on the website seem to be working for him (they just redirect me back to the websites homepage) whereas they used to on his previous machine.

The only difference between each machine is that his old one was Vista and the new one is Windows 7.

Has anyone come accross this issue?

Some code:

The form:

<div class="form_text"></div>
 <div class="form_box_link">
    <asp:ImageButton id="LoginSubmitButton" onClick="FLoginWebService" ImageURL="~/Images/login.png" runat="server" />

The code behind (delphi):

procedure TMemberLogin.FLoginWebService(Sender: TObject; e: System.EventArgs);
begin
    //Code Removed but using OutputDebugString shows nothing is being done in here
end;

As mentioned, this works everywhere else except on his windows 7 machine.

EDIT: Ok, I have some more information that has helped me. It seems ALL the post back URLs are incorrect. I manually set the PostBackUrl against the ImageButton control and got this part working but ALL other controls that require post backs on the website do not work properly and are posting to the wrong URL's. I am using IIS's rewrite module but this is the only machine that I am having an issue with it on.

A: 

I have managed to sort this issue out. It turns out the problem was the URLs ASP.NET was using for the post back. I am not sure what caused this issue (there must be a different setting somewhere) but I have added some JavaScript to the top of my page to sort the issue. ASP.NET initializes a var called theForm so I just did:

theForm.action = window.location.href;

and that sorted the issue out.

Thanks for any comments people have made.

webnoob