Wednesday, March 28, 2012

Page.Redirect From Control Event Using Atlas

I am a newbie in atlas..just a couple of hour of experience.

I've managed to create a simple project with sucess, and all works well. But, in a certain event of an treeview control, the "SelectedNodeChanged", i need to redirect the page to another URL. The Page.Redirect runs it the server, but the page doesn't do the postback. How can i force the postback, in a certain event?

Thank you very much.

Well...i found out that the Page.Redirect in Atlas doesn't work very well.

I've got this solution, it's not the best way to do this, but it works,

Page.ClientScript.RegisterStartupScript(this.GetType(),"redirect",@."window.location.href='default.aspx';",true)

No comments:

Post a Comment