ASP.NET - FLV player - asp.net

For a company we are making 2 different sites, now one of those sites got an flv player in it and streams local flv files to the clients with the webpart from: http://www.aspnetflashvideo.com
Now on the second site we also want an flv player but this one without local files, it should stream the flv file from the other website to the users of this second website.
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register Assembly="ASPNetFlashVideo.NET3" Namespace="ASPNetFlashVideo" TagPrefix="ASPNetFlashVideo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ASPNetFlashVideo:FlashVideo ID="FlashVideo1" runat="server"
VideoURL="http://flv.dumpert.nl/7649709f_YTDL_1.flv.flv" >
</ASPNetFlashVideo:FlashVideo>
</div>
</form>
</body>
</html>
Is this possible and how? Because it doesn't seem to work with the webpart.

I may be completely off track here, but it looks like your Video Url has the file extension in twice... Try:
<ASPNetFlashVideo:FlashVideo ID="FlashVideo1" runat="server"
VideoURL="http://flv.dumpert.nl/7649709f_YTDL_1.flv" >
</ASPNetFlashVideo:FlashVideo>

Related

Redirecting back from where user came from in ASP.NET Page Not code behind

I have a ASP.NET page what I got at the moment is
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="RedirectMeNow.aspx.cs" Inherits="abc.eyd._12.TEMPLATE.LAYOUTS.RedirectMeNow" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
how can I redirect a user back from where he came from here, not in code behind like here
Redirecting back from where user came from in ASP.NET User Control
OR I just want a ASP.NET page that redirects user on call
To avoid using code-behind, you have to use a client-side Javascript function:
window.history.back();
You can either bind it to an event or execute it during page load.
EDIT:
If u want to make this page a redirect-only page, you can add this code to your tag:
<head>
....
<script type="text/javascript>
window.history.back();
</script>
</head>
It will be executed as soon as page is getting loaded.
That's it!

Trouble With Static UICulture Setting and Implicit Localization

I’m playing with implicit localization on my Win7 box via VS2010 and something doesn’t quite seem right. I have a trivial page where I set the resourceKey of my GO Button to “bnGO”:
<%# Page Language="VB" culture="auto" meta:resourcekey="PageResource1" uiculture="es" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Implicit Localization</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="bnGO" runat="server" meta:resourcekey="bnGO" />
</form>
</body>
</html>
Then I have both testForm.aspx.resx and testForm.es.aspx.resx files that set the value of bnGO.Text appropriately:
When I run the application, the GO Button displays the "Go Forth!" text defined in the default testForm.aspx.resx even though testForm.aspx has uiculture set to “es” (which I think is Spanish).
What am I doing wrong?
The name of the file should be:
testForm.aspx.es.resx
Not
testForm.es.aspx.resx

Image wont show on visual studio design time

I have a virtual directory on my iis -portal, which contains images. I put an image tag in my asp.net form.
<img src="http://localhost/portal/images/button_right.gif" alt="Alternate Text" />
This is the code:
<%Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication15.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<img src="http://localhost/portal/images/button_right.gif" alt="Alternate Text" />
</div>
</form>
</body>
</html>
The image shows when I run the project, on the browser.
The image doesnt show in design time. - I see X, instead of an image.
I set all read write execute permissions alowed o the virtual directory.
You should never specify image src as an absolute path. Use ~ to address your application path. It requires the runat="server" attribute since it is substituted by IIS at server.
<img runat="server" src="~/images/button_right.gif" alt="Alternate Text" />

Want C# ASPX page to produce plain text rather than HTML

I have a C# project in Visual Studio that produces an aspx page. The code I am editing is in default.asp.cs. When I build the project a file default.aspx is produced. This file looks something like this:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CSRValidationConnector._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
When I make my web request most of this page comes back.
But I want the page to return only plain text and not any of this HTML. How do I configure things so that nothing is returned except what I add via Response.Write calls in default.aspx.cs?
Just remove all the HTML except:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CSRValidationConnector._Default" %>
and in your codebehind Page_Load do a Response.Write("String")
Response.ContentType is what you are looking for :)
Response.ContentType = "text/plain";

Error with masterpage

i'm creating a brand new masterpage with VS2010 Beta 2 and I get this warning (that causes me errors in the content pages):
Validation (XHTML 1.0 Transitional):
Content is not supported outside
'script' or 'asp:content' regions.
The masterpage's code :
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Bob.master.cs" Inherits="TShirtFactory.Web.All.Core.lib.masterpage.Bob" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
As you can see, it's the default masterpage generated code. I get the warning when I hover the tag at top. Does anybody have an idea of what's going on ?
Thank you
In my case the error has gone after removing masterPageFile attribute from the Page-section in the web.config file:
<configuration>
<system.web>
<pages styleSheetTheme="mystyle" masterPageFile="~/myMaster.master" />
</system.web>
</configuration>
Or, if you need this attribute in the web.config file, just add empty MasterPageFile to you master page:
<%# Master Language="VB" AutoEventWireup="false" CodeFile="mySecondMaster.master.vb" Inherits="mySecondMaster" MasterPageFile="" %>
It's simple... Visual Studio is bonkers. Actually, the truth is that it can't possibly validate some markup simply because much of it is dynamic. For instance, in my project I have a constant warning about the lack of a <title> tag because it's added dynamically. Bottom line: the XHTML validator does not really know much about ASP.NET code.

Resources