Rank: Newbie Groups: Member
Joined: 4/9/2010 Posts: 1 Points: 3
|
I'm trying to do this:
ASPNetVideo.WindowsMedia VideoMediaPlayer1 = new WindowsMedia(); VideoMediaPlayer1.MaintainAspectRatio = true;
VS2008 tells me that "ASPNetVideo.WindowsMedia' does not contain a definition for 'MaintainAspectRatio' and no extension method 'MaintainAspectRatio' accepting a first argument of type 'ASPNetVideo.WindowsMedia' could be found".
Also, when I try to add VideoMediaPlayer1 to a Placeholder, like so:
VideoPlaceholder.Controls.Add(VideoMediaPlayer1);
I get "cannot convert from 'ASPNetVideo.WindowsMedia' to 'System.Web.UI.Control'".
It would be very helpful if you provided real documentation for these controls. You know, the kind that shows the namespaces, inheritance hierarchy, properties/methods, etc. How am I supposed to know what ASPNetVideo.WindowsMedia inherits from if it's not a UI.Control? And how are you supposed to add these controls programmatically? Your sample code examples has zero examples - they are all declarative through the ASPX file, none with examples using code-behind.
Any help appreciated; I'm trying to get a project finished and switched to your controls because they seemed the best. But I'm stuck now.
|
Rank: Administration Groups: Administration
Joined: 7/20/2007 Posts: 305 Points: -2,485 Location: Primarily in New York, USA
|
Unfortunately, you can't add any of our controls from the code-behind - that's your problem, and it's why we haven't documented any of that. You need to place the control in your ASPX page, and then you can reference it from code-behind, but you can't add the control to the page from code-behind.
Sorry that this isn't clearer in our documentation.
-Dave
|