简体   繁体   中英

How to return data after AJAX postback back to the client in ASP.NET?

I have a simple question - I use update panel with custom server control inside. I call __doPostBack from javascript and RaisePostBackEvent on the server fires (I implement IPostBackEventHandler). This is client to server call. Could I return data back to the client (after this partial postback)? What is the best way to achieve this?

Thank you!

Heko, Have you followed the postback in debug mode yet? If you're using IE with client debugging enabled, you may be able to follow the partial postback in both client and server.

I would think that using ScriptManager.RegisterHiddenField or ScriptManager.RegisterStartupScript would be your best bet. Or both? Depends on what sort of elements you are passing back and forth.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM