I know the file explorer is an ASP.NET control, but much of the code needed is javascript and I'm just not any good with that. So here's my noob question. I have a video player control that embeds a windows media player on my page. I have a File Explorer control above it showing the contents of a Video Library folder where the user is asked to double-click a filename and I want it to play in my video player. From the OnClientItemSelected(sender, args) javascript function, can I call a function in my ASP code-behind page? Or is there a simpler/easier way to do this? I need to take the selected filename and fill in the 'VideoURL' field of the video player control.
I have tried several different ways to do this with no luck and I'm getting frustrated. I know this should be a simple task but I just don't get it.
Here is the code in my primary .aspx page. There is nothing in the .aspx.vb page yet.
I have tried several different ways to do this with no luck and I'm getting frustrated. I know this should be a simple task but I just don't get it.
Here is the code in my primary .aspx page. There is nothing in the .aspx.vb page yet.
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <script type="text/javascript"> function OnClientItemSelected(sender, args) { var vidpath = args.get_item().get_name(); PlayVid(vidpath); <-- This is where I was thinking of calling a code-behind vb function } </script> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> Select a file below to view it.<br /><br /> <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Height="250px" InitialPath="/VideoLibrary" Skin="Outlook" EnableCreateNewFolder="False" ToolTip="Double-click a video from the list to view it." TreePaneWidth="0px" VisibleControls="Grid, ContextMenus" onclientitemselected="OnClientItemSelected" Width="606px"> <Configuration SearchPatterns="*.*" ViewPaths="/VideoLibrary"> </Configuration> </telerik:RadFileExplorer> <br /><br /> <ASPNetVideo:WindowsMedia ID="WindowsMedia1" runat="server" Height="480px" VideoURL="some_video_title.wmv" Width="640px" WMode="Window"> </ASPNetVideo:WindowsMedia> </form></asp:Content>