Hello,
In my project i have used RadAsyncUpload and Rad confirm.
My uploaded files count is not getting maintained after rad confirm appears.
I want to perform insert query after i get a YES from confirm dialog and my validateServiceCallRequirements function returns true.
I m explaining this scenario with small example.
flow is same in my project but a lot of other things are going on.
''''''''''''''''''''''My Upload.vb code''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''' Upload.aspx page'''''''''''''''''''''''''''
In my project i have used RadAsyncUpload and Rad confirm.
My uploaded files count is not getting maintained after rad confirm appears.
I want to perform insert query after i get a YES from confirm dialog and my validateServiceCallRequirements function returns true.
I m explaining this scenario with small example.
flow is same in my project but a lot of other things are going on.
''''''''''''''''''''''My Upload.vb code''''''''''''''''''''''''''''''''''
Partial Class Testing_Upload
Inherits System.Web.UI.Page
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
If e.Argument = "Goback" Then
Call SaveData()
End If
End Sub
Protected Sub btnSaveServiceCall_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveServiceCall.Click
MsgBox(RadAsyncUpload1.UploadedFiles.Count.ToString + " COUNT IS CORRECT")
If validateServiceCallRequirements() = True Then
Call SaveData()
End If
End Sub
Protected Function validateServiceCallRequirements() As Boolean
RadWindowManager.RadConfirm("My message", "GoTo", 250, 110, Nothing, "Confirm", "")
Return False
Exit Function
End Function
Protected Sub SaveData()
MsgBox(RadAsyncUpload1.UploadedFiles.Count.ToString + " COUNT IS INCORRECT")
End Sub
Protected Sub Testing_Upload_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
End If
End Sub
End Class
'''''''''''''''''''''''''' Upload.aspx page'''''''''''''''''''''''''''
<%@ Page Language="VB" MasterPageFile="~/InductoServMasterPage.master" AutoEventWireup="false" CodeFile="Upload.aspx.vb" Inherits="Testing_Upload" title="Untitled Page" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
Runat
=
"Server"
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Windows7"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
AjaxSettings
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:UpdatePanel
ID
=
"UpdatePanelServiceCallRequirements"
runat
=
"server"
EnableViewState
=
"true"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
skin
=
"Windows7"
Font-Names
=
"Arial"
Font-Size
=
"14px"
PostbackTriggers
=
"btnSaveServiceCall"
MultipleFileSelection
=
"Automatic"
Width
=
"300px"
AllowedFileExtensions
=
".jpg,.png,.jpeg,.gif,.bmp,.doc,.docx,.xls,.xlsx,.txt,.pdf,.ppt,.pptx,.pps,.ppsx,.pot,.potx"
Localization-Select
=
"Browse"
>
</
telerik:RadAsyncUpload
>
<
asp:Button
id
=
"btnSaveServiceCall"
runat
=
"server"
Text
=
"Save"
UseSubmitBehavior
=
"False"
CssClass
=
"btnCustom"
></
asp:Button
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
></
telerik:RadCodeBlock
>
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function GoTo(arg)
{
if (arg == true )
{
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Goback");
}
}
</
script
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager"
runat
=
"server"
>
<
AlertTemplate
>
<
div
>
<
div
class
=
"rwDialogPopup radalert"
style
=
"padding-left: 0; font-family :Arial ; font-size :14px ; background: url('../Images/icon/Information.png') no-repeat left center !important;"
>
<
div
class
=
"rwDialogText"
style
=
"margin-left: 50px; "
>
{1}
</
div
>
<
div
style
=
"margin-left: 50px; "
>
<
a
onclick
=
"$find('{0}').close();"
class
=
"rwPopupButton"
href
=
"javascript:void(0);"
>
<
span
class
=
"rwOuterSpan"
>
<
span
class
=
"rwInnerSpan"
>##LOC[OK]##
</
span
>
</
span
>
</
a
>
</
div
>
</
div
>
</
div
>
</
AlertTemplate
>
<
ConfirmTemplate
>
<
div
class
=
"rwDialogPopup radconfirm"
style
=
" font-family :Arial ; font-size :14px ; background: url('../Images/icon/Question.png') no-repeat left center !important; "
>
<
div
class
=
"rwDialogText"
>
{1}
</
div
>
<
div
>
<
a
onclick
=
"$find('{0}').close(true);"
class
=
"rwPopupButton"
href
=
"javascript:void(0);"
>
<
span
class
=
"rwOuterSpan"
>
<
span
class
=
"rwInnerSpan"
>Yes</
span
>
</
span
></
a
>
<
a
onclick
=
"$find('{0}').close(false);"
class
=
"rwPopupButton"
href
=
"javascript:void(0);"
>
<
span
class
=
"rwOuterSpan"
>
<
span
class
=
"rwInnerSpan"
>No</
span
></
span
>
</
a
>
</
div
>
</
div
>
</
ConfirmTemplate
>
</
telerik:RadWindowManager
>
</
asp:Content
>