Problem FlashVars parameter asp.net

Posted by sofie-vo on Stack Overflow See other posts from Stack Overflow or by sofie-vo
Published on 2010-05-06T11:55:37Z Indexed on 2010/05/06 11:58 UTC
Read the original article Hit count: 192

Filed under:
|
|
|

Code for asp.net page

<%@ Page Language="VB" AutoEventWireup="false"  CodeFile="trainingupload.aspx.vb"  Inherits="trainingupload" %> <!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 height>
    <object width="1000" height="800"> <param name="movie" value="player.swf" /> <param name="FlashVars" value='userid=<%=String.Format(getuser())%>" '/> <embed src="bin-release/trainingscentrum.swf" FlashVars='userid=<%=String.Format(getuser())%>" ' width="1500" height="800" /> </embed> </object>
    </div>
    </form> </body> </html>

Code behind

Public Function getuser() As Guid Dim user As MembershipUser = Membership.GetUser() Dim userid As Guid = (CType(user.ProviderUserKey, Guid)) Return userid End Function

In the code above I use an function to return the userid. When I replace <%=String.Format(getuser())%> with an actual userid, I get the value in my flex application. But this code returns nothing. What am I doing wrong?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about flex