or
Private Sub ParentPageAjaxManagerHandling() Dim ParentPageAjaxManager As RadAjaxManager = RadAjaxManager.GetCurrent(Page) ParentPageAjaxManager.AjaxSettings.AddAjaxSetting(ParentPageAjaxManager, Me.EditCountryRegionWebUserControl)
AddHandler ParentPageAjaxManager.AjaxRequest, AddressOf ParentPageAjaxManager_AjaxRequest End Sub Private Sub ParentPageAjaxManager_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
If e.Argument.Contains("LoadCountryRegionByID_") Then Dim NewIDString As String = e.Argument.Replace("LoadCountryRegionByID_", "") Me.EditCountryRegionWebUserControl. LoadCountryRegionByID(If(NewIDString <> "" And NewIDString <> "null" And NewIDString <> "undefined", Guid.Parse(NewIDString), Guid.Empty)) ElseIf e.Argument = "DeleteSelectedItem_In_" + Me.CountryRegionsListRadGrid.MasterTableView.ClientID Then DeleteSelectedCountryRegion() End If End Sub
<telerik:RadButton ID="NewCountryRegionRadButton" runat="server" AutoPostBack="False" Text="" OnClientClicked="NewCountryRegionRadButton_Clicked">
<telerik:RadWindow ID="AddOrEditCountryRegionRadWindow" runat="server" Behavior="Close, Move, Reload" Behaviors="Close, Move, Reload" KeepInScreenBounds="True" ReloadOnShow="True" Height="135px" Width="600px" VisibleStatusbar="False" Modal="True" DestroyOnClose="True" ShowContentDuringLoad="False"> <ContentTemplate> <table style="width: 100%;"> <tr> <td colspan="2"> <uc1:CountryRegionWebUserControl runat="server" ID="EditCountryRegionWebUserControl" /> </td> </tr> <tr> <td style="width: 45px"></td> <td> <asp:Label ID="EditCountryRegionWindowErrorLabel" runat="server" ForeColor="Red"></asp:Label> </td> </tr> <tr> <td></td> <td> <telerik:RadButton ID="EditCountryRegionWindowOkRadButton" runat="server" Text="موافق"> </telerik:RadButton> <telerik:RadButton ID="EditCountryRegionWindowCancelRadButton" runat="server" AutoPostBack="False" CausesValidation="False" OnClientClicked="EditCountryRegionWindowCancelRadButton_Clicked" Text=""> </telerik:RadButton> </td> </tr> </table> </ContentTemplate> </telerik:RadWindow>function NewCountryRegionRadButton_Clicked(sender, args) { var AddCountryWindow = $find("<%= AddOrEditCountryRegionRadWindow.ClientID %>"); $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>"). ajaxRequest("LoadCountryRegionByID_" + "<%= Guid.Empty %>"); AddCountryWindow.show(); }
