This is a migrated thread and some comments may be shown as answers.

asp fileupload control in advancedEditTemplate

6 Answers 120 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Otto
Top achievements
Rank 1
Otto asked on 31 Mar 2010, 12:32 PM
I've put a asp.fileupload-control  and a Submit-Button in the advanced form for the "advancedEditTemplate".
this does not work - the file-upload has no files. 

Is it possible to send files to the server right out of the AdvanvedEditTemplate. And if the answer is "yes" - how can I do that.

Tanks,
Otto

6 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 Apr 2010, 12:38 PM
Hi Otto,

There is a code library project on how to integrate RadUpload in the advanced form of RadScheduler:
http://www.telerik.com/community/code-library/aspnet-ajax/scheduler/upload-in-radscheduler.aspx

Let us know if you have any questions.

Best wishes,
Peter
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.
0
Otto
Top achievements
Rank 1
answered on 01 Apr 2010, 01:22 PM
Thank You,

your example was rely what I needed. Works like a charm. 

tx, o
0
Otto
Top achievements
Rank 1
answered on 07 Apr 2010, 11:57 AM
Invalide viewstate

perhaps the joy was to early (-:

after adding a additional panel with 2 Buttons and a Checklistbox (nothing fancy I think)
ASPX here:
                <asp:TextBox runat="server" ID="tbSearchContacts" ></asp:TextBox>
                <asp:Button runat="server" ID="btnSearchContacts" Text="Search Contacts" 
                        onclick="btnSearchContacts_Click" /><br />
                <asp:CheckBoxList ID="cblContacts" runat="server" /> 
                <asp:Button runat="server" ID="btnUseContacts" Visible="false"
                Text="Use Contacts" onclick="btnUseContacts_Click" style="width: 119px"/>                
                </asp:Panel>

Code here:
        [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
        public string Contacts
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                foreach (ListItem item in cblContacts.Items)
                {
                    if (item.Selected)
                        sb.Append(item.Value + "|");
                }
                return sb.ToString().Trim('|');
            }      
            set
            {
                if (string.IsNullOrEmpty(value)) return;
                string[] contacts = value.Split('|');
                cblContacts.DataSource = contacts;
                cblContacts.DataBind();
            }
        }
       protected void btnSearchContacts_Click(object sender, EventArgs e)
        {
            string [] contacts = new string[]{"Heinz", "Bernd", "olga"};
            cblContacts.DataSource = contacts;
            cblContacts.DataBind();
            btnUseContacts.Visible = true;
        }

        protected void btnUseContacts_Click(object sender, EventArgs e)
        {
            btnUseContacts.Visible = false;

        }


I got 


Line 16:                 using (REF.Database.NHibernate.NHDatabase.CurrentSession.StartTransaction())Line 17:                 {Line 18:                     base.ProcessRequest(context);Line 19:                 }Line 20:             }

Source File: C:\Röfix\CRM\Source\Surface\CRM.WEB\Webforms\TransactionalWebFormBasePage.cs    Line: 18 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI, Version=2010.1.309.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace: 

[FileLoadException: Could not load file or assembly 'Telerik.Web.UI, Version=2010.1.309.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +62   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +42   System.Type.GetType(String typeName, Boolean throwOnError) +71   System.Web.UI.ObjectStateFormatter.DeserializeType(SerializerBinaryReader reader) +10845204   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +1259   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +557   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +349   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +1206   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +349   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +557   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +557   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +349   System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +136[ArgumentException: The serialized data is invalid.]   System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +10945788   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +382   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +59   System.Web.UI.HiddenFieldPageStatePersister.Load() +124[ViewStateException: Invalid viewstate. 	Client IP: ::1	Port: 65415	User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1045 Safari/532.5	ViewState: /wEPDwULLTE2OTcwMjQ5ODMPZBYCAgUPZBYCAgUPFCsACA8WDB4LXyFEYXRhQm91bmRnHgxTZWxlY3RlZERhdGUGAEAjPDOjzAgeDFNlbGVjdGVkVmlldwspeVRlbGVyaWsuV2ViLlVJLlNjaGVkdWxlclZpZXdUeXBlLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDEwLjEuMzA5LjIwLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTEyMWZhZTc4MTY1YmEzZDQCHhdFbmFibGVBamF4U2tpblJlbmRlcmluZ2geDFNob3dGdWxsVGltZWgeFkVkaXRpbmdSZWN1cnJpbmdTZXJpZXNoZA8UKwAeFCsABBYOHgJJRCgpWVN5c3RlbS5JbnQ2NCwgbXNjb3JsaWIsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5ATQeCVN0YXJ0RGF0ZQaANH3QpH7MSB4HRW5kRGF0ZQaABAaUtX7MSB4HU3ViamVjdAUCcnIeC0Rlc2NyaXB0aW9uZR4OUmVjdXJyZW5jZVJ1bGVlHg9SZWN1cnJlbmNlU3RhdGULKXdUZWxlcmlrLldlYi5VSS5SZWN1cnJlbmNlU3RhdGUsIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMTAuMS4zMDkuMjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MTIxZmFlNzgxNjViYTNkNABkZBYIHg9BcHBvaW50bWVudFR5cGU...][HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]   System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +148   System.Web.UI.HiddenFieldPageStatePersister.Load() +10959734   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +11043464   System.Web.UI.Page.LoadAllState() +46   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11038983   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11038522   System.Web.UI.Page.ProcessRequest() +91   System.Web.UI.Page.ProcessRequest(HttpContext context) +240   CRM.WEB.Webforms.TransactionalWebFormBasePage.ProcessRequest(HttpContext context) in C:\Röfix\CRM\Source\Surface\CRM.WEB\Webforms\TransactionalWebFormBasePage.cs:18   ASP.webforms_b_default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\fixitcrmweb\b70b6b4f\b1dec079\App_Web_9kzaf_rr.0.cs:0   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
0
Veronica
Telerik team
answered on 09 Apr 2010, 03:37 PM
Hello Otto,

We tried to replicate the problem using the code project and your code, but to no avail. Please, check the attached modified demo.

Cheers,
Veronica Milcheva
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.
0
Jon Morris
Top achievements
Rank 1
answered on 21 Sep 2010, 03:16 PM
Hi,

Not to hijack this thread, but, seems relavent. Is there an equivalent demo project in VB?

Thanks,
Sri
0
Veronica
Telerik team
answered on 24 Sep 2010, 04:33 PM
Hi Jon Morris,

No problem for that.
You may find the Visual Basic version in the attached .zip file. 

All the best,
Veronica Milcheva
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
Tags
Scheduler
Asked by
Otto
Top achievements
Rank 1
Answers by
Peter
Telerik team
Otto
Top achievements
Rank 1
Veronica
Telerik team
Jon Morris
Top achievements
Rank 1
Share this question
or