ラベル webpage の投稿を表示しています。 すべての投稿を表示
ラベル webpage の投稿を表示しています。 すべての投稿を表示

2012年3月26日月曜日

Response.redirect causes post back using Atlas


Hi,

I have a webpage with a button on it. The button is placed in an update panel. I want to redirect user to another page when the user press the button. Basically it is a save button which save user information and redirect user to another page.

I tried using response.redirect("anotherpage.aspx") but it caused post back however the button is placed under a n update panel.

Can anyone help me out? I want to save data on button click and redirect user to another page without causing post back.


Thanks.
Imtiaz

Redirect has to cause a postback, you are trying to "redirect" the user.

Firstly, all things inside an update panel cause a postback, they just go through some different steps, and only deal with events in the update panel, and only refresh the part of the page inside the panel.

So your button is designed to postback, which it does... then redirects, the update panel picks this up, and changes the browser page.

The functionality is correct.

If you want, instead of a button with a redirect, make a regular html button with a clientside event.

onclick="redirect();"

function redirect(){

location.herf = 'newURL.aspx';

}

If you call a client side method to change the location of the page, then there is no post back to the server

2012年3月24日土曜日

Rich text editor in an update panel

I want to use a javascript editor like fckeditor in my webpage where the textarea is in an updatepanel.

But the textarea isn't is the welcome page, she apear when you click on a linkbutton.

How can i do for the editor to trigger when the textarea come or for the editor to load when i click the link.

Thanks in advance.I NEED YOU, HELP ME PLEASE