Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi

                                    I made
                                     ASPxGridViewTemplateReplacement

                                    All OK !

                                    Example:

                                    public class EditFormTemplate : ITemplate {
                                        public void InstantiateIn(Control container) {

                                    // Here I need

                                       string strTmp = Server.MapPath("~/MyFiles/");

                                       }
                                    }

                                    Why here "Server.MapPath()" not working ???

                                    Help my

                                0

                                Hi Juri,

                                The problem is caused by the fact that you are trying to access the Server property in a class that doesn't provide this property.
                                You can get the current http server using the HttpContext.Current property.

                                	
                                [C#]
                                string fileName = HttpContext.Current.Server.MapPath("~/Images/1.png");

                                I've created a sample project with this solution. Please examine it, and let us know if this helps.

                                Thanks,
                                Ruslan

                                Q218276.zip
                                0

                                Hi

                                Thanks

                                Your solution is working and better as my.

                                I made "static" by "Page_Load"

                                public partial class mitglieder : System.Web.UI.Page
                                {
                                    static string gl_str_path;
                                    protected void Page_Load(object sender, EventArgs e)
                                    {
                                        gl_str_path = Server.MapPath("foto/");

                                ..............
                                .............
                                .............
                                    public class EditFormTemplate : ITemplate
                                    {
                                        public void InstantiateIn(Control container)
                                        {
                                              ......
                                            void ASPxUploadControl1_FileUploadComplete(object sender, DevExpress.Web.ASPxUploadControl.FileUploadCompleteEventArgs e)
                                             {
                                 
                                                  e.UploadedFile.SaveAs(gl_str_path + e.UploadedFile.FileName);

                                It is working too.

                                ---------

                                I have another Question.

                                            ASPxUploadControl.ClientSideEvents.UploadingProgressChanged = "function(s, e) {alert();}"; // it works
                                            ASPxUploadControl.ClientSideEvents.FileUploadStart = "function(s, e) {alert();}"; // dont work
                                            ASPxUploadControl.ClientSideEvents.FileUploadComplete = "function(s, e) {alert();}"; // it works

                                ClientSideEvents.UploadingProgressChanged

                                dont work.

                                ClientSideEvents.FileUploadComplete

                                work only if ShowUploadButton = true;

                                i need help

                                0

                                Hi Juri,

                                I suspect that the issue is caused by the fact that you did not set the form's enctype attribute to the "multipart/form-data" value. This is necessary to support data uploads.

                                Please try this solution and let us know if this helps. If this does not help, please provide a sample project to reproduce this issue on my side. We will do our best to help you.

                                Thanks,
                                Ruslan

                                0

                                Hi
                                It does not help.

                                I send to you a sample project WebSite11.zip

                                by cklick in Upload-ASPxUploadControl <ClientSideEvents FileUploadComplete="function(s, e) {....... };" // It work
                                by cklick in Upload-Button <ClientSideEvents FileUploadComplete="function(s, e) {....... };" // It dont work

                                <ClientSideEvents UploadingProgressChanged="function(s, e) {....... };"
                                It dont never work.

                                WebSite11.zip
                                0

                                Hi Juri,

                                I've tried to run your project, and it worked properly on my side. Probably, the ASPxClientUploadControl.UploadingProgressChanged event isn't raised when you upload small files on your local machine. This operation is very fast. Try to upload file with a large size. The ASPxClientUploadControl.UploadingProgressChanged event is raised after server response. If your CPU is busy, then server won't respond in time.
                                I have slightly modified your project and attached it. Please examine it and let us know if this helps.

                                Thanks,
                                Ruslan

                                0

                                Thanks

                                It is memberlist of karate club by my Sohn.

                                USE mitglieder.aspx

                                click an Edit Button

                                click Select

                                click Upload-ASPxUploadControl --- OK it works.
                                ------------------------------------------------------------
                                click "Aqua" Upload-Button -- It is not working

                                Upload-Button --> ClientSideEvents.Click = "function(s, e) {UploadControl1.UploadFile();}"; line 528

                                BUSHIDO_2.zip
                                0

                                Hi Juri,

                                I've reviewed your project and found a problem in it. By default, the ASPxButton.AutoPostBack property is true, and clicking on it initiates a postback. To overcome this issue please set the ASPxButton.AutoPostBack property to false.

                                	
                                [C#]
                                ASPxButton tb63 = new ASPxButton(); tb63.AutoPostBack = false; tb63.Text = "Upload"; tb63.CssFilePath = "~/App_Themes/Aqua/{0}/styles.css";

                                Please try this solution and let us know if this helps.

                                Thanks,
                                Ruslan

                                0

                                Hi Ruslan
                                It is working.

                                Thanks !!!

                                respekt

                                After upload I I'd like the foto of member update.
                                Line 559
                                 tb62.ClientSideEvents.FileUploadComplete =
                                                     "function(s, e) { PopupProgressingPanel.Hide();
                                                                            if(e.isValid)ASPxPopupControlOK.Show();
                                                                            alert('~/foto/' + e.callbackData);
                                                                            _aspxGetElementById('MitgliedImage').ImageUrl = '~/foto/' + e.callbackData;
                                                                          }";

                                _aspxGetElementById('MitgliedImage').ImageUrl = '~/foto/' + e.callbackData; // It is not working
                                or
                                _aspxGetElementById('MitgliedImage').visible = false; // not working too

                                I looked to
                                http://demos.devexpress.com/ASPxperienceDemos/UploadControl/Example.aspx

                                mitglieder.aspx.cs
                                0

                                Hi Ruslan

                                I need NO answer.

                                 MitgliedImage.mainElement.src was the problem

                                function Uploader_OnUploadComplete(args)
                                {
                                        PopupProgressingPanel.Hide();
                                        if(args.isValid)ASPxPopupControlOK.Show();
                                        MitgliedImage.mainElement.src = "foto/" + args.callbackData;
                                }

                                Thanks

                                Juri

                                0

                                Hi Juri,

                                I'm very glad that my assistance was helpful, and you have addressed the problem.

                                Please do not hesitate to contact us if you experience problems when using our products. We will be happy to help you at any time.

                                Thanks,
                                Ruslan

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners