Click here to Skip to main content
16,005,141 members
Home / Discussions / C#
   

C#

 
GeneralTreeview Problem Pin
Prasad Anand29-Mar-04 18:42
Prasad Anand29-Mar-04 18:42 
General.NET Remoting Using C# Pin
Prasad Anand29-Mar-04 18:36
Prasad Anand29-Mar-04 18:36 
GeneralRe: .NET Remoting Using C# Pin
Heath Stewart29-Mar-04 18:52
protectorHeath Stewart29-Mar-04 18:52 
QuestionCircular dependency solution? Pin
Alex Korchemniy29-Mar-04 17:52
Alex Korchemniy29-Mar-04 17:52 
AnswerRe: Circular dependency solution? Pin
Heath Stewart29-Mar-04 18:29
protectorHeath Stewart29-Mar-04 18:29 
GeneralRe: Circular dependency solution? Pin
Alex Korchemniy30-Mar-04 6:06
Alex Korchemniy30-Mar-04 6:06 
GeneralRe: Circular dependency solution? Pin
Andy Wieberneit30-Mar-04 11:20
Andy Wieberneit30-Mar-04 11:20 
Generalwindows media player custom control Pin
Marveyles29-Mar-04 17:00
Marveyles29-Mar-04 17:00 
Hi guys & experts,

wanna ask u some questions...
I've managed to create a windows media player custom control, which inherits from HtmlControl, but having problem in setting the URL attribute. Here's the code:

<br />
using System;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Collections;<br />
using System.Collections.Specialized;<br />
using System.Reflection;<br />
using Microsoft.MediaPlayer;<br />
using System.Web.UI.HtmlControls;<br />
using System.Web.UI.WebControls;<br />
<br />
<br />
namespace LogPlayer1<br />
{<br />
	/// <summary><br />
	/// Summary description for MediaPlayer.<br />
	/// </summary><br />
	public class MediaPlayer : HtmlControl		<br />
	{<br />
		<br />
		<br />
		public MediaPlayer()<br />
		{<br />
			<br />
			Url = WebForm1.passedURL;<br />
		<br />
			<br />
		}<br />
		public string Url  <br />
		{    <br />
			get { return (string) ViewState["Url"]; }    <br />
			set { ViewState["Url"] = value; }  <br />
		}  <br />
		protected override void Render(HtmlTextWriter writer)  <br />
		{    <br />
			writer.WriteBeginTag("OBJECT");<br />
			writer.WriteAttribute("style", "Z-INDEX: 101; LEFT: 152px; WIDTH: 464px; POSITION: absolute; TOP: 160px; HEIGHT: 397px"); <br />
			writer.WriteAttribute("classid", "clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6");<br />
			<br />
			writer.WriteBeginTag("param");<br />
			writer.WriteAttribute("name", "URL");    <br />
			writer.WriteAttribute("value", Url); <br />
			writer.WriteEndTag("param"); <br />
<br />
			writer.WriteEndTag("object"); <br />
<br />
		}<br />
		<br />
	}<br />
}<br />
<br />
<br />


This code basically writes the the windows media player to the ASPX file. but somehow I can't set the URL. The WebForm1.passedURL is a variable containing the url of the file. I've done some tests, and proven that the passedURL value is passed to the MediaPlayer class, but somehow cannot be set as the URL of the windows media player object. Or maybe the player won't play it for some reason. Could any of u give any solutions to this?


thanks in advance guyz Blush | :O
GeneralRe: windows media player custom control Pin
Heath Stewart29-Mar-04 18:23
protectorHeath Stewart29-Mar-04 18:23 
GeneralRe: windows media player custom control Pin
Marveyles29-Mar-04 18:39
Marveyles29-Mar-04 18:39 
GeneralRe: windows media player custom control Pin
Heath Stewart29-Mar-04 18:45
protectorHeath Stewart29-Mar-04 18:45 
GeneralRe: windows media player custom control Pin
Marveyles29-Mar-04 19:05
Marveyles29-Mar-04 19:05 
GeneralTransparent Images on Transparent Forms Pin
authenticgeek29-Mar-04 15:38
authenticgeek29-Mar-04 15:38 
GeneralRe: Transparent Images on Transparent Forms Pin
Andy Brummer29-Mar-04 16:04
sitebuilderAndy Brummer29-Mar-04 16:04 
GeneralRe: Transparent Images on Transparent Forms Pin
authenticgeek29-Mar-04 16:33
authenticgeek29-Mar-04 16:33 
GeneralRe: Transparent Images on Transparent Forms Pin
Heath Stewart29-Mar-04 19:53
protectorHeath Stewart29-Mar-04 19:53 
GeneralRe: Transparent Images on Transparent Forms Pin
authenticgeek30-Mar-04 7:07
authenticgeek30-Mar-04 7:07 
GeneralDataGrid and FlexGrid Pin
«_Superman_»29-Mar-04 15:21
professional«_Superman_»29-Mar-04 15:21 
GeneralRe: DataGrid and FlexGrid Pin
Heath Stewart29-Mar-04 18:16
protectorHeath Stewart29-Mar-04 18:16 
GeneralRe: DataGrid and FlexGrid Pin
«_Superman_»1-Apr-04 14:53
professional«_Superman_»1-Apr-04 14:53 
GeneralRe: DataGrid and FlexGrid Pin
Heath Stewart2-Apr-04 9:05
protectorHeath Stewart2-Apr-04 9:05 
GeneralQuestion on drag-n'-drop and files vs folders Pin
Flack29-Mar-04 14:47
Flack29-Mar-04 14:47 
GeneralRe: Question on drag-n'-drop and files vs folders Pin
Heath Stewart29-Mar-04 18:09
protectorHeath Stewart29-Mar-04 18:09 
GeneralRe: Question on drag-n'-drop and files vs folders Pin
Flack30-Mar-04 4:47
Flack30-Mar-04 4:47 
GeneralRe: Question on drag-n'-drop and files vs folders Pin
Heath Stewart30-Mar-04 4:54
protectorHeath Stewart30-Mar-04 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.