someComboBox.DataSource = GetDataList();
someComboBox.DataBind();
someComboBox.ClearSelection();
someComboBox.Text =
string
.Empty;
someComboBox.SelectedValue = valueFromUrlParameter;
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
runat
=
"server"
>
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
EnableEmbeddedSkins
=
"false"
Skin
=
"MPower"
ReadOnly
=
"true"
DataKeyField
=
"AppointmentID"
DataSubjectField
=
"Subject"
DataStartField
=
"Start"
DataEndField
=
"End"
DataRecurrenceField
=
"RecurrenceRule"
DataRecurrenceParentKeyField
=
"RecurrenceParentID"
width
=
"750px"
DayStartTime
=
"08:00:00"
DayEndTime
=
"20:00:00"
TimeZoneOffset
=
"03:00:00"
>
</
telerik:RadScheduler
>
</
asp:Content
>
AppointmentCollection appointments = new AppointmentCollection();
this.RadScheduler1.DataSource = appointments.GetAppointmentsByDate("08/19/2011");
Telerik.Web.UI.RadScheduler._preInitialize("ctl00_ContentPlaceHolder1_RadScheduler1",0,0,1,false);
protected void fileUploaded(object sender, FileUploadedEventArgs e)
{
try
{
if (RadAsyncUpload1.UploadedFiles.Count > 0)
{
if (targetPersonalTmpFolder.Exists.Equals(false)) targetPersonalTmpFolder.Create();
foreach (UploadedFile uploadedFile in RadAsyncUpload1.UploadedFiles)
{
//UploadedFileInfo uploadedFileInfo = new UploadedFileInfo(uploadedFile);
string fullPath = Path.Combine(targetPersonalTmpFolder.ToString(), uploadedFile.GetName());
uploadedFile.SaveAs(fullPath, true);
TmpFiles_List.Add(new UplodedFileData()
{
FileName = uploadedFile.GetName(),
FullFileName = targetPersonalTmpFolder.ToString() + @"\" + uploadedFile.GetName(),
//FileContentLength = Math.Round(uploadedFile.InputStream.Length / 1024d, 0).ToString() + " KB"
FileContentLength = Math.Round(uploadedFile.ContentLength / 1024d, 0).ToString() + " KB"
});
}
BindFiles();
BindTmpFiles();
}
}
catch (Exception ex)
{
//Pravdepodobne bol stlaceny klaves F5 refresh stranky...
ReinitializeForm();
}
}
--------------------------------------------------------------------------------------------
The problem is that property uploadedFile.ContentLength doesn't return real length of the file. I've found that this uploadedFile.InputStream.Length returns correct file size, but when I tried to use it, then this error appeared: The process cannot access the file because it is being used by another process...
Something similar is described here: http://www.telerik.com/community/forums/aspnet-ajax/async-upload/temporary-files-locked-after-upload.aspx
For further information you can check the attachment.
Please help me to solve this issue...
Best regards Vasssek