Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
140 views
Hello I have got problems with radupload
I disadi to rename file that i save on the server.
1 step: i control tah file with this name is present in server folder
when not i save ther wit orginal name 
when is present i save with diferent name. 
My problem is that radcontrol is saving 2 time file wit orginal name text.txt and text1.txt 
I was used code writed by Petya

------- code by Petya----------

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        For Each file1 As UploadedFile In RadUpload1.UploadedFiles
            If (File.Exists(Server.MapPath(Path.Combine("files", file1.GetName())))) Then
                file1.SaveAs(Server.MapPath(Path.Combine("files", file1.GetNameWithoutExtension() + "1" + file1.GetExtension())), True)
            Else
                file1.SaveAs(Server.MapPath(Path.Combine("files", file1.GetName())))
            End If
        Next

    End Sub

---------------------------------------------------

I modificated code

-----------------My code--------------------

    Dim i As Integer
        i = 0

        For Each file1 As UploadedFile In uploadFly.UploadedFiles
            If (File.Exists(Server.MapPath(Path.Combine("upload/flv", file1.GetName())))) Then
                file1.SaveAs(Server.MapPath(Path.Combine("upload/flv", file1.GetNameWithoutExtension() + "1" + file1.GetExtension())), True)
            Else
                If i = 0 Then
                    i = 1
                    file1.SaveAs(Server.MapPath(Path.Combine("upload/flv/temp", file1.GetName())))
                    i = 1
                    i = 1
                    i = 1
                    i = 1
                    lab11.Text = i.ToString

                Else
                    file1.SaveAs(Server.MapPath(Path.Combine("upload/flv", file1.GetName())))

                End If
              
            End If
            Exit For
        Next


----------------------------------------------------------------
Always radupload do fro me 2 coy of file :( 

Using breadpoin i view that in any case loop "For each" is doing twice for this reasons i was insered "If i=0" when i=1 i change the directory but after first loop in memory i view always 0. Can you control this problem ??


-------------------------------------------Radupload on my page--------------------------
<br />
<telerik:RadUpload ID="uploadFly" Runat="server" Skin="Hay" MaxFileInputsCount="1"  OverwriteExistingFiles="false">
</telerik:RadUpload>
<br />

-------------------------------------------------------------------------------------------------------

Sorry for my english and thanks for help
Krzysztof
Top achievements
Rank 1
 asked on 25 Apr 2009
7 answers
687 views
I like the features of the numeric textbox but was wondering if I could implement it so that a user entered a decimal and it was shown as a percentage (ie enter 0.01 and see 1%).  I'm hoping to not have to use the masked textbox since it seems there that you are predefining the size of the text.
ManniAT
Top achievements
Rank 2
 answered on 25 Apr 2009
0 answers
86 views
Hi,
I`m trying to use the rad uploader but I dont know what exactly I have to add to web.config

I tried many times but it failed, I read the help many times but it was usless to me (or I didn`t understand it well).
so please I want a small example about how to upload File(s) using RadUploader with a progress bar area

or tell me step by step what I have to do to use it successfully

Regards
Mando
Top achievements
Rank 1
 asked on 25 Apr 2009
0 answers
114 views
Here, We can take multiple xml file as contextmenu..

 foreach (RadTreeNode node in RadTreeView1.GetAllNodes())
        {         
            if (node.Level == 0)
            {
                RadTreeViewContextMenu cn = new RadTreeViewContextMenu();
                cn.LoadContentFile("ContextMenu.xml");
                node.TreeView.ContextMenus.Add(cn);
                node.ContextMenuID = cn.ID;
            }
            else if (node.Level == 1)
            {
                RadTreeViewContextMenu cn = new RadTreeViewContextMenu();
                cn.LoadContentFile("ContextMenu1.xml");
                node.TreeView.ContextMenus.Add(cn);
                node.ContextMenuID = cn.ID;
            }
            else
            {
                RadTreeViewContextMenu cn = new RadTreeViewContextMenu();
                cn.LoadContentFile("ContextMenu2.xml");
                node.TreeView.ContextMenus.Add(cn);
                node.ContextMenuID = cn.ID;
            }

        }
Minesh
Top achievements
Rank 1
 asked on 25 Apr 2009
1 answer
124 views
Sometimes I need to setup a CommandItemTemplate and need to setup my own "Add new" and "Refresh" buttons (<asp:ImageButton runat="server" ID="refreshGrid" ImageUrl="~/Images/refresh.gif" CommandArgument="Refresh" />).
When I skin other grids in the same project, I'd like custom CommandItemTemplates to look the same.

How do I get/download/reference the icons from specific Telerik standard skins?
Princy
Top achievements
Rank 2
 answered on 25 Apr 2009
1 answer
107 views
Hi

Issue :1
      I used the drop down with in treeview(with check box) Control.  Here with When i have selected the node. The node showing the drod dwon selected text like India, USA,.... When the Postback the page that time the selected text is disapper. Let me know how can i handle this problem.

Issue: 2
    The Above concepts similar I am trying that  to (http://www.luxuryretreats.com/)  Drop down Logic.  When i Click the First dropdown the Ajax is Properly Working.. When i was Clicking the Second Dropdwon that time the page is Postback. I had used the simlar Logic in First Down.. Let me know how can i solve this problem.
Princy
Top achievements
Rank 2
 answered on 25 Apr 2009
7 answers
810 views
Hi,

What happen with the skin previews for all controls?
have they been taken out from the new site on purpose or is it an oversight?

Thanks,
Sasha
Steve Newbery
Top achievements
Rank 1
 answered on 25 Apr 2009
1 answer
139 views
Hello,

Is there a way to only allow Wednesdays to be picked from the datepicker and gray out the rest of the dates ?

Thanks
Gina
Shinu
Top achievements
Rank 2
 answered on 25 Apr 2009
1 answer
75 views
I want all the items in a grid (including child grids) to look the same. I have this working in one grid but forgot how I turned off alternating styles. Now I'm trying to get another grid setup the same way and no matter what I setup the rows look different and I can remember where the setting for turning off alternatingitemstyles is. Any help??????

Thanks,

Joe B
ManniAT
Top achievements
Rank 2
 answered on 24 Apr 2009
1 answer
172 views
I'm trying to use radeditor as simple text editor wherein I capture script code snippets for dynamic execution else where in my system.  However, when I retreive the saved code snippet and set it on the content property of the editor, the editor does not recognize the new line control characters and places the entire script on one line.

Is there a way to have the editor recognized the new line characaters (like notepad, etc)?  I've looked at the various formatting options and nothing is jumping out at me.

thanks.
mark
ManniAT
Top achievements
Rank 2
 answered on 24 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?