Show Full Month Name and Full Path in AsyncUpload.

Thread is closed for posting
4 posts, 0 answers
  1. gc_0620
    gc_0620 avatar
    225 posts
    Member since:
    Feb 2008

    Posted 16 Aug 2015 Link to this post

    Using UI for ASP.NET AJAX Q1 2015 SP1 with VS 2013.
    1) I would like to get Full Month Name (i.e. August, September etc..) from RadMonthYearPicker instead of integer value (i.e. 8, 9 etc). Refer to attachment_#_1.  code is here.

    <telerik:RadMonthYearPicker ID="RadMonthYearPicker1"   AutoPostBack="true"  OnSelectedDateChanged ="btnSubmit_Click" runat="server"></telerik:RadMonthYearPicker>
     protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string startmonth_year = RadMonthYearPicker1.SelectedDate.Value.Month.ToString() + " , " + RadMonthYearPicker1.SelectedDate.Value.Year.ToString();
            DateTime selectedDate = RadMonthYearPicker1.SelectedDate.Value;
            DateTime startDate = selectedDate.AddDays((selectedDate.Day - 1) * -1);
            DateTime endDate = startDate.AddDays(DateTime.DaysInMonth(startDate.Year, startDate.Month) - 1);
            Response.Write("Start Month and Year: "+startmonth_year + ' ' +  ' ' + ". Start Month beginning/end date: "+startDate.ToShortDateString() + " - " + endDate.ToShortDateString());
        }
    2) How I can pass full file name path (\\Your_Server_Name\Your_Folder_Name\Your_File.csv) to Stored Procedure as Parameter or SSIS as variable? Or store the full file name path in string or session variable.

    3) How I can show full file name path in Upload AsyncUpload  (i.e. \\Your_Server_Name\Your_Folder_Name\Your_File.csv). Refer to attachment_#2.

     

    Thanks a lot

  2. gc_0620
    gc_0620 avatar
    225 posts
    Member since:
    Feb 2008

    Posted 16 Aug 2015 in reply to gc_0620 Link to this post

    sorry attachment # is here
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. gc_0620
    gc_0620 avatar
    225 posts
    Member since:
    Feb 2008

    Posted 16 Aug 2015 Link to this post

    Attachment#1 & #2 is here.
  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 19 Aug 2015 Link to this post

    Hello,

    Thank you for contacting Telerik Support.

    1. I have examined the code and it seems that you are using the SelectedDate property of RadMonthYearPicker. Note that it returns DateTime? object. In order to retrieve the full month name from it you can use the "MMMM" custom format specifier. Check out the following article that elaborates more on the matter.


    The code snippet below illustrates the approach:

    protected void RadMonthYearPicker1_SelectedDateChanged(object sender, SelectedDateChangedEventArgs e)
    {
        DateTime? selectedDate = (sender as RadMonthYearPicker).SelectedDate;
     
        string monthName = selectedDate.Value.ToString("MMMM");
    }


    2. See 3.

    3. You cannot get and show the file location when selecting a file for upload with RadAsyncUpload. Due to security reasons the browser will allow only the file name to be retrieved.

    Regards,
    Viktor Tachev
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top