So its being a while working on WEB API and still it surprises with me everyday with the new way I can extend it. In this article I would like to share TypeConverters and ModelBinders, how they fit into everyday work and how they can make the API access easier for end clients.
- Using ScriptManager Class.
- Using Page.RegisterClientScriptBlock or Page.RegisterStartupScript or Page.ClientScript object
Page.RegisterClientScriptBlock or Page.RegisterStartupScript methods are deprecated methods and they shouldn’t be used. Microsoft has replaced them with Page.ClientScript object methods.
ScriptManager class can also be used to do the same but with the slight difference, these methods are compatible with Asp.Net AJAX partial post backs where as the Page.ClientScript object methods are not compatible with Asp.Net AJAX.
Recently, I faced an issue in which I need to get the ID of the control which is responsible for post back inside update panel.
If we are using Update Panel and then we cannot get the post back control id using Request.Form[“__EVENTTARGET”].