homepage Welcome to WebmasterWorld Guest from 54.204.168.212
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
"Object moved to here."
Problems with ASP redirect in NS and Opera
garann

10+ Year Member



 
Msg#: 726 posted 6:16 pm on Jun 10, 2003 (gmt 0)

Hi,

I'm getting a message "Object moved here." when I try to use a drop-down at the top of my page to change the page's view settings. "here" is a link to the same page the drop-down posts to. This only happens on the pages where the view state isn't relevant - when there's actually something to view, it doesn't cause a problem.

The DHTML is pretty straight-forward. It occurs in a header.ascx control and looks like this:
<form name="frmView" method="POST" action="updateView.aspx">
Select a view type:
<select id="viewChanger" name="selViewType" onchange="this.form.submit();">
<option value="quick">Quick View</option>
<option value="detail">Detailed View</option>
<option value="full">Full view</option></select></form>

The page the new view state is submitted to looks like this:
<%@ Page Language="vb" %>
<script runat="server">
Sub Page_Load(obj as Object, E as EventArgs)
dim newView as string = request.form("selViewType")
dim from as string = request.urlReferrer.pathAndQuery().substring(17)
session("viewType") = newView
response.redirect(from)
end sub
</script>

Also, in a footer.ascx control, a line of JavaScript sets the drop-down so that the current state is selected.

I looked for other threads on this topic, but can't see how to apply the information within them to this situation. Any help?

Thanks,
g.

 

mattur

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 726 posted 1:56 pm on Jun 21, 2003 (gmt 0)

Not sure if this applies in asp.net, but I've seen this is classic asp. Solution was to do:

reponse.clear
response.redirect(...)
response.end

rather than just a redirect. HTH

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved