More in this section
Forums / General Discussions / specifying the uploading path with radUpload

specifying the uploading path with radUpload

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Aisha
    Aisha avatar
    4 posts
    11 Nov 2010
    10 Dec 2010
    Link to this post
    I want to specify the path during run time when using Rad upload.
    It works when I set the property during design time.
    01.Protected Sub btnPrcd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrcd.Click
    02.        Dim title As String
    03.        Dim file, mfile As String
    05.        title = Label1.Text
    06.        If (title = "") Then
    07.            Label2.Text = "You have to select a meeting"
    08.            Exit Sub
    09.        Else
    10.            Session("title") = title
    11.            file = "C:/Users/Aisha Al-Mahmood/Documents/Visual Studio 2008/Websites/event management system/uploaded/" & Session("user_id")
    12.            mfile = file & "/" & Session("title")
    13.            Session("path") = mfile
    14.            Label2.Text = file
    16.            Directory.CreateDirectory(file)
    17.            Directory.CreateDirectory(mfile)
    19.            Response.Redirect("upload.aspx")
    20.        End If
    21.    End Sub
    23.'the below code is in another page: "upload.aspx"
    24.Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    25.        Dim target As String = RadUpload1.TargetFolder.ToString()
    26.        'target = '~/uploaded'
    27.        RadUpload1.TargetFolder = target & "/" & Session("title")
    28.    End Sub

    but when I specify it during run time it doesn't work !!
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    11 Dec 2010
    Link to this post
    Hello Aisha,

    Thank you for using our services.

    The TargetFolder property is a property which accepts application relative paths ( starting with ~/) can you please make sure that you are adding the target folder using this convention?

    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered