Inserting Third Party Video (You Tube) in Grid View
1. The first way of Embedding the video-
Inorder to Embed the video[You Tube's] in Grid View , the following steps to be followed-
i. Create a template field in Grid View
ii. Go to source insert the copied <iframe> of video (you want to embed from you tube ) inside the <ItemTemplate>
iii. Now, your Grid View will be showing the videos.
2. The second way of Embedding the video using database-
Inorder to do so just follow simple steps-
i. Go to You Tube > start the desired video you want to embed.
ii. Copy the id of that video from the URL
https://www.youtube.com/watch?v=that_section
Copy the id which will be shown after the '=' sign
iii. And just paste it to the database column.
3. Third way of Embedding the video by TextBox through the user input-
With the help of Eval() this embedding can be done.
Steps-
1. Go to source
2. Paste the <iframe> inside <ItemTemplate>.
3. Find the video_url/src attribute in <iframe>.
4. Delete the id from url.
5. Place the Eval() instead.
like:- <%# Eval("Column_name")%>
Comments
Post a Comment