I set the value on the hidden textbox but I do the postback on the button. This is the good stuff that you won't get from any Microsoft MVP articles. Thanks, Brad This is the blog of Simone Chiaretta, an Italian . And finally, you are ready to update the contents of the Update Panel based on the value set by the javascript method on the client: This changes the text in the label inside the Update Panel with the value set in the hidden textbox and passed through by the async postback. "Click this button and watch the Update Panel refresh.! I was just thinking wouldn't be great if I had away to trigger an Update Panel via java script. NET developer, architect, Microsoft MVP, ASPInsider, Subtext core member, ASP.

asp net calendar not updating-17asp net calendar not updating-46asp net calendar not updating-8

You see that I registered an Async Post Back Trigger on the Click event of the button.

I also added a label that will be updated by the event raised by the textbox.

Remember to set the Update Mode to Conditional, otherwise the Update Panel will always be refreshed, not only when there is a postback inside or when a trigger fires.

Using the Client ID property of the control will ensure that you get the right ID even if the control is inside a masterpage, a webcontrol, a repeater or whatever might change the ID.

Now that I've 2 controls, using thr Hidden Field makes more sense.

ricardo, from the button in the popup you call the Upd Panel Update JS function in parent page (which contains both another hidden button). Page Request Instance(); prm._do Post Back(' This was the missing link for what I had to do with ASP. The client wanted a list of product thumbs and when you click the thumb, it shows the corresponding product details overhead. But, instead of doing the 2 lines of javascript code to get the control name, you can use .

Or, if you don't need the value, you can directly call the __do Post Back with the id of updatepanel Hi Everyone, It tooked me 2 days to figure it out why it's not working... That (in my case - I don't know why) the __do Post Back method doesn't work with the ID of the control - it needs the name of the control.. I tried all of the approches found in here, but it didnt worked...

I thought that updating an Update Panel from javascript was one of the most frequently asked question about ASP. The first article explains a very nice way to trigger the update of an Update Panel from Java Script, while the other two are very detailed overviews on the internals of how an Update Panel is updated.

NET Ajax, but even looking around a lot I didn't find a clean and polished solution for what should be a common task. NET Ajax extender for such a simple task, but after a few hours of Google-ing, I found a few nice articles on Ben Rush's blog, which is a very valuable source of knowledge on the internals of ASP. The only thing you need to do to refresh from javascript is to register a Button (hidden via CSS) Click event as async trigger for an Update Panal and then call the following method from your javascript method: Yes, that easy. But in my page I also had to pass a value to the Update Panel, so the button was not enough.

So I adapted a bit Ben's solution, and I add hidden text box, and update its value before calling the do Post Back method.

To implement that you need to add 4 "things" in your ASP. You need a textbox to store the value you want to pass over to the Update Panel, but you don't want to show it in the page, so it must be hidden via CSS.