Click here to Skip to main content
12,896,175 members (52,998 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
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
<%@ 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" "">
<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <br />
        <br />
        <br />
        &nbsp; &nbsp;
        <ASPNetVideo:WindowsMedia ID="WindowsMedia1" runat="server" Style="z-index: 28; left: 0px;
            position: absolute; top: 0px" >
        <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">
                <asp:BoundField DataField="adname" HeaderText="adname" SortExpression="adname" />
        <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;

This is The Error message
SqlDataSource1 Property 'url' not found in DataSource. All DataSources used with this control must contain a 'url' attribute
Posted 3-Jan-13 6:09am
Updated 4-Jan-13 4:50am
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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."


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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100