Nevron .NET Vision
Framework / Web Forms / Postback / HTML Image Map With Postback

In This Topic
    HTML Image Map With Postback
    In This Topic
     Overview

    ASP .NET introduced a new programming paradigm called server side events, which allows you to write code in the same way as you write code for client applications. Nevron Chart and Diagram for .NET support this feature which allows you to seamlessly integrate the components in ASP .NET forms.

    In order for a component to fire server side events it must generate a response of type NHtmlImageMapResponse and you must subscribe to the OnClick event which is invoked when the user clicks on the object. In order to achieve this our components inject the necessary client side script in the generated map. When a server side event is generated it receives two arguments - the component that generated the event (object sender) and an object of type NPostbackEventArgs (derived from EventArgs). Note that the URL for the element must be empty. Otherwise the component will generate script redirecting the browser instead of postback script. In other words URL has higher priority.

    The NPostbackEventArgs object has a property called Id that contains an identifier to the element clicked by the user. You can use that identifier to determine the actual object by resolving it in the document. For more information on identifiers refer to the Nevron Framework DOM documentation.