开发者

Refresh a button

 protected void Button1_Click(object sender, EventArgs e)
 {

 }

My application contains a update button. when I click the button the browser must automatically refresh the page.

Is there any code behind code for button?开发者_如何学编程


there is none. Doing so will create a postback on your page, and so will "refresh" your page, at least everything that was done in the page load event and in the prerender event.

In a updatePanel in ajax, it will create a callback. So that only the updatePanel will undergo the postback on the client side, whereas the whole page cycle will be run on the server side.


with server-side button control - you cant.

not sure what are you trying to achieve, but here's a JS workaround for the issue (using JS location.reload() to reload the page):

<input type="button" value="refresh" onclick="javascript:location.reload()" />


Here is one way to do it

Refresh a button

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜