2012年3月28日水曜日

Response.Redirect - issues...

Alrighty...so I can't get response.redirect to work anymore. I found another post with a solution, but that doesn't do anything except give me javascript errors.

The given solution is to change Response.Redirect("page.aspx") into something like this:

string script ="window.location.href='" + page +"';";

Page.ClientScript.RegisterStartupScript(this.GetType(),"redirect", script,true);

When I try to do this I just get the ubiquotous "object required" javascript error. I need to be able to redirect my users...any ways to do this when using Atlas?

David

I should note that if you set your scriptmanager to

EnablePartialRendering="false"

Then response.redirect works just fine. Since I don't know much about that attribute I have set it to false for now and am still moving forward.

However, if anyone knows how to get around it when it is set to true, I would love to hear it.

Thanks,

David


I can't say for sure how to fix your redirect problem, but I know that setting the EnablePartialRendering attribute to "false" is the wrong way. This allows you page to be dynamically updated... the entire foundation AJAX programming.

hello.

well, i'm really not sure on what you're talking about.

ajax extensions do respect response.redirect and you do get a redirect in the client (of course, this means that you'll get a complete refresh on the client side).

0 件のコメント:

コメントを投稿