How to get file path from the server side

2 posts, 0 answers
  1. Shaza
    Shaza avatar
    19 posts
    Member since:
    Apr 2011

    Posted 01 Aug 2011 Link to this post

    I'm working on fileExplorer and I need to do the following scenario:
    - When the user clicks on the file/folder => the path of the file/folder should be posted to the server side.
    I've tried to invoke server side method from onClientSide event using PageMethods, but that didn't work !!
    Can you help me?

    Here's the code using PageMethods:
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server" EnablePageMethods="true">
     <telerik:RadFileExplorer ID=
    "RadFileExplorer1" runat="server" Skin="WebBlue"   onitemcommand="RadFileExplorer1_ItemCommand" OnClientItemSelected="GetMessage()">

    <script type="text/javascript">
    function OnGetMessageSuccess(result, userContext, methodName) {
            alert(result);<br>    }
    function OnGetMessageFailure(error, userContext, methodName) {
         alert(error.get_message());  }
    function GetMessage(sender, args) {     

    public static void Message()
         { label1.Text =
    "YES!";<br>        }

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 03 Aug 2011 Link to this post

    Hi Shaza,

    I believe the following KB article will be of help solving this case:
    Pass all of the selected items' paths to the server

    All the best,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. DevCraft R3 2016 release webinar banner
Back to Top