Saturday, May 1, 2010

Post Back from AJAX Update Panel

Recently, while working on a dev assignment I needed to make a complete post back (with page refresh) from a button control placed inside AJAX Update Panel. Exact problem was like this. There is a webpage on which I require AJAX functionality. Also, there is one button on whose click I want to make a post back. That button is also placed inside AJAX update panel and anything placed inside update panel by default does a Ajax callback. Sample web page is shown below:

image

Initially I thought of moving my Post Back Call button outside of AJAX update panel but that would have ruined my UI design. I was trying different options when I stumbled upon UpdatePanel’s child element <Triggers>. <Triggers> provides another child element <asp:PostBackTrigger /> with an attribute ControlID. We can specify from which control we want to make a post back call using this ControlID. Below code sample shows how to do this in ASP.NET.

image

This is quite simple to understand. Button btnPostBackCall will now make a complete call back. I recommend further reading on this topic from:

Currently Listening To: Heartbreak Warfare by John Mayer
~eNjOy~

11 comments:

茂恒 said...

sex女,ut,貼影,av,高潮,女優,做愛,手機成人影片,色遊戲,成人動漫,百分百貼圖區,85cc影片,成人影音,av色情影片,A片線上,a片,sex,777,三級線上看,美女的照片,視訊做愛,78論壇,打飛機,免費視訊,成人影院,辣妹視訊,視訊聊天,影片網,kiss911,a片,交友,聊天,做愛,免費影片,性交,線上成人,網路色情,聊天,美女自慰,免費a分享,免費短片,裸照,一夜情,女優,85cc成人片,美女寫真,偷拍a,情人視訊聊天室

宥妃 said...

Better say nothing than nothing to the purpose. ........................................

修強 said...

天下沒有走不通的路,沒有克服不了的困難,沒有打不敗的敵人。......................................................

SigridNolen1祐音 said...

All good things come to an end. .........................................

麗威麗威 said...

喜歡你的部落格,留言請您繼續加油.............................................

俊嘉 said...

老天爺賦予了強者的能力,就是要他比弱者多擔待 ..................................................

文佩齊華 said...

Venture a small fish to catch a great one. ............................................................

MargaritoJ淑珍_Arent0 said...

成功可招引朋友,挫敗可考驗朋友 ............................................................

esthermelvin said...

謝謝分享好文章........................................

振瑋 said...

愛,拆開來是心和受兩個字。用心去接受對方的一切,用心去愛對方的所有。.................................................................

楊俊美 said...

你不能決定生命的長度,但你可以控制它的寬度..................................................................