bonjour; je vous integrer ce code c# dans une site web en asp et j'ai besoin de cette code avec vb pas c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public partial class PlayVideo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
return;
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["BackOfficeConnectionString"].ConnectionString))
{
con.Open();
//storedproc VideoInfo_get retrieve 6 records randomly from database
SqlCommand cmd = new SqlCommand("VideoInfo_get", con)
SqlDataAdapter da = new SqlDataAdapter(cmd)
DataTable tbl = new DataTable("VideoData")
da.Fill(tbl)
lblRefresh.Text+="<a href=\"PlayVideo.aspx\">Refresh Play List</a>"
dlVideoLinks.DataSource = tbl
dlVideoLinks.DataBind()
}
}
public string BuildVideoCode(string embeddedCode)
{
//add autoplay=1 and wmode=transparent, replace bouble quote with html equivalent
return embeddedCode.Replace("fs=1", "fs=1&autoplay=1")
.Replace("<param name=\"allowFullScreen\" value=\"true\"></param>", "<param name=\"allowFullScreen\" value=\"true\"></param><param name=\"wmode\" value=\"transparent\"></param>")
.Replace("type=\"application/x-shockwave-flash\"", "type=\"application/x-shockwave-flash\" wmode=\"transparent\"")
.Replace("\"", """);
}
public string DisplayImage(string imgPath, string title)
{
//build the image html code which is used for video link
return "<img src=\"images/" + imgPath
+ "\" width=\"75\" height=\"60\" border=\"0\" title=\""
+ title + "\"/>";
}
}
aider moi svp
cordialement