Control CNVPControl;
switch (MediaType)
{
//播放Media格式
case "1":
CNVPControl = Page.LoadControl("~/UserControl/Public/PlayRm.ascx");
CNVPControl.ID = "PlayMedia";
PlaceHolder1.Controls.Add(CNVPControl);
break;
//播放RM,RMVB格式
case "2":
CNVPControl = Page.LoadControl("~/UserControl/Public/PlayRm.ascx");
CNVPControl.ID = "PlayMedia";
PlaceHolder1.Controls.Add(CNVPControl);
break;
//默认播放Media格式
default:
CNVPControl = Page.LoadControl("~/UserControl/Public/PlayMedia.ascx");
CNVPControl.ID = "PlayMedia";
PlaceHolder1.Controls.Add(CNVPControl);
break;
}