Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to play a wmv file automatically which is stored in the sqlserver,using windows media control plz help me it is very urgent,i used playlist to fetch the records from database but it show error to mention url where to put url in sqldatasource
This is the Code
XML
<%@ Page Language="VB"  Debug ="true"  AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default"  %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<%@ Register Assembly="ASPNetVideo.NET2.AJAX" Namespace="ASPNetVideo" TagPrefix="ASPNetVideo" %>
<%@ Register Assembly="ASPNetMediaGUI.NET2" Namespace="ASPNetMediaGUI" TagPrefix="ASPNetMediaGUI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;</div>
        <br />
        <br />
        <br />
        &nbsp; &nbsp;
        <ASPNetVideo:WindowsMedia ID="WindowsMedia1" runat="server" Style="z-index: 28; left: 0px;
            position: absolute; top: 0px" >
        </ASPNetVideo:WindowsMedia>
        <ASPNetMediaGUI:PlayList ID="PlayList1" runat="server" AutoGenerateColumns="False"
            DataSourceID="SqlDataSource1" MediaPlayer="WindowsMedia1" PlayState="Play" SelectedTrack="1"
            ShowHeader="False" Style="z-index: 58; left: 0px; position: absolute; top: 0px">
            <Columns>
                <asp:BoundField DataField="adname" HeaderText="adname" SortExpression="adname" />
            </Columns>
        </ASPNetMediaGUI:PlayList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:digitalConnectionString %>"
            SelectCommand="SELECT [adname] FROM [upload]"></asp:SqlDataSource>
        &nbsp;<br />
        &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp; &nbsp;
    </form>

</body>
</html>



This is The Error message
SqlDataSource1 Property 'url' not found in DataSource. All DataSources used with this control must contain a 'url' attribute
Posted
Updated 4-Jan-13 4:50am
v2
Comments
Abhinav S 3-Jan-13 12:21pm    
Post some code here. Impossible to answer your questoin just like this.
Sandeep Mewara 3-Jan-13 12:21pm    
Update question with your related code snippet that troubles you.

1 solution

The WMV media container and the codecs under same umbrella name (I know some 3 different versions) can provide really good video quality, especially for reasonably low bit rate. The problem is that these container format and codecs are proprietary. You can freely use them for conversion and playing, but they are unsuitable for the Web. Web requires open formats.

For further detail, please see my recent answer of video container formats and codecs, closely related to your question:
HTML5 and Mime, Streaming a video?[^].

Also, see the post reference above and pay attention for my recommendations to use ffMpeg or libavcodec utilities for media conversion. There are widely universal. It's very likely that they will help you to re-master your video records to present them properly in your Web applications.

I think this is a way to go. You can re-master your video using these utilities taking into account present-day or future Web requirements. As far as re-mastering is concerned, let me quote my own answer referenced above though: "The selection of good sets of encoding parameters to provide a reasonable trade-off between size of the file and quality is a separate song. You may need to experiment for a while and read some practical recommendation to gain enough experience."

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900