How To Display Video On The aspx page

Jun 23 2010 8:26 AM
I have written code to insert video into sql server then i read the video through "VideoHandler.ashx"

if i run the "VideoHandler.ashx" Then it runnig the video in mediapalyer but when i user the bellow code in my button control

if  i click the button the media player was dispalyed but the video was not played what is the problem with the bellow code
(if run the VideoHandler directly it's working)


 <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
            <object id="player" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"   height="170" width="300">  //Here If i change the classid="something" then the medial player was opened seperately and played the video  but i want to get the media player as a part of the page

if i use the above id the medial player is coming as a part of the webpage but not playing the video, actually what is this classid how to give correct class id (i don't know any thing about this <object> i downloaded this project form the internet and runnig the proj)

so help me on this/////                    
   
                        <param name="url" value='<%# "VideoHandler.ashx" %>'/>
                        <param name="showcontrols" value="true" />
                        <param name="autostart" value="true" />
                    </object>
        </ItemTemplate>
    </asp:Repeater>


private DataTable GetSpecificVideo(object i)
    {
        string connectionString = ConfigurationManager.ConnectionStrings["uploadConnectionString"].ConnectionString;
        SqlDataAdapter adapter = new SqlDataAdapter("SELECT Video, ID FROM Videos WHERE ID = @id", connectionString);
        adapter.SelectCommand.Parameters.Add("@id", SqlDbType.Int).Value = (int)i;
        DataTable table = new DataTable();
        adapter.Fill(table);
        return table;
    }
    protected void ButtonShowVideo_Click(object sender, EventArgs e)
    {
        Repeater1.DataSource = GetSpecificVideo(2);
        Repeater1.DataBind();
    }