Click here to Skip to main content
14,546,884 members
Rate this:
Please Sign up or sign in to vote.
See more:
Is there a way to display the video in a website page as an arranges icons of videos or thumbnails, so whenever I click on one video it should open a new window to play that video? not play it in the same page.
Posted
Updated 11-Jan-13 3:43am
v2
Comments
ZurdoDev 11-Jan-13 7:49am
   
Sure, you just have to write the code to do it. You may want to look for jquery plugins to help with this. There are likely some already out there.
ntitish 11-Jan-13 8:02am
   
can u send me the information about that.......

1 solution

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

Solution 1

Yes possible. Did you try anything?

Use the following steps:
1. Design the videos in any format you like, tabular, list, etc
2. Wrap the videos in a link tag such that when you click it, onclick event of the controls is raised.
3. In the onclick event, use Windows.Open method to show the video.

Reference:
MSDN: showModalDialog Method[^]
MSDN: open method (Windows)[^]


Try out!
   
Comments
ntitish 14-Jan-13 1:17am
   
//code in designing part

<asp:Panel ID="panelVideoLinks" runat="server" BackColor="White"
style="margin-right: 0px">
<fieldset style="border: 2px solid #EEEEEE; background-color:#fff">
<div style="font-size:medium;color:#FF8A3C; font-weight: bold;">Videos:</div>



<marquee behavior = "alternate" onmouseover="this.stop();" önmouseout="this.start();" scrolldelay="10" >
<asp:DataList ID="datalstvideosdisplay" runat="server" RepeatDirection="Horizontal"
Font-Name="Verdana" Font-Size="8pt"
CellSpacing="5" Item-BorderWidth="1" Item-BorderColor="#c0c0c0"
BorderStyle="None" ItemStyle-Width="125"
CellPadding="0" ItemStyle-HorizontalAlign="Center"
ItemStyle-VerticalAlign="Bottom" GridLines="Both"
ItemStyle-BorderStyle="Solid" onitemdatabound="datalstvideosdisplay_ItemDataBound" >
<itemtemplate>
<object id="Object1" width="100" height="80" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
standby="Loading Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" id="param1" runat="server" />
<param name="ShowControls" value="false" />
<param name="ShowStatusBar" value="false" />
<param name="ShowDisplay" value="false" />
<param name="autostart" value="false" />
<embed type="application/x-mplayer2"

pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/"

width="424" height="379" src="ccent31.wmv"

filename="ccent31.wmv" autostart="0" showcontrols="0" showstatusbar="0" showdisplay="0"> </embed>
</object>


<itemstyle borderstyle="Solid" horizontalalign="Center" verticalalign="Bottom"
="" width="125px">

</marquee>

</fieldset>

//this was the code in .cs page

SqlCommand cmdvideos = DBManager.DataAccess.command();
cmdvideos.Parameters.Add(new SqlParameter("@option", SqlDbType.VarChar, 50));
cmdvideos.Parameters["@option"].Value = "PickVideoContentToDisplay";

cmdvideos.Parameters.Add(new SqlParameter("@status", SqlDbType.VarChar, 10));
cmdvideos.Parameters["@status"].Value = "Active";

cmdvideos.Parameters.Add(new SqlParameter("@Content_type", SqlDbType.VarChar, 10));
cmdvideos.Parameters["@Content_type"].Value = "Video";

string sqlqueryvideos = "Alumniproc";
DataSet dsvideos = DBManager.DataAccess.getdata(sqlqueryvideos);
if (dsvideos.Tables[0].Rows.Count > 0)
{
datalstvideosdisplay.DataSource = ds.Tables[0];
datalstvideosdisplay.DataBind();
}
//what was m y problem is how to play video by clicking on the particular video

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




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