morningqert.blogg.se

Ajax popup window example
Ajax popup window example







OffsetX and OffsetY: These two properties specify the number of pixels to offset the popup window horizontally or vertically from its default position as specified by Position property. This is because every time use will select any item from the RadioButtonList control the value of the selected option will be returned from the popup.ĬommitScript: This is another optional property and specifies the additional script to run after setting the result of the popup window. In the above example I put “value” as the value of this property. It specifies the relative position of the popup control with respect to target control.ĬommitProperty: This property is also optional and specifies which property will return the result of the popup window. Position: This is optional property and can be set to Left, Right, Top, Bottom or Center.

ajax popup window example

In the above example I am using Panel control.

ajax popup window example

PopupControl: The ID of the control to display as popup window.

#AJAX POPUP WINDOW EXAMPLE UPDATE#

This is the requirement here in this tutorial because I want to update my TextBox with the selected sports name as soon as user selects any sports item from the RadioButtonList control. Notice that the RadioButtonList control’s AutoPostBack property is set to true and an event handler is attached with the OnSelectedIndexChanged event of RadioButtonList.

ajax popup window example

UpdatePanel control contains a RadioButtonList control with some ListItems to display different sports names. Inside Panel I am using AJAX UpdatePanel control so that any post back occur inside Panel not cause the whole page to be flicker or refresh. In the above markup, I first declared an ASP.NET Panel control.







Ajax popup window example