Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am doing a project in asp.net(c#).Below code is from aspx page.here my problem is roomid i have to chage from label.


flashvars.userid = "0";
flashvars.username="shiva"; flashvars.roomid = "sqc7jm6";

For Example:

flashvars.roomid="sqc7jm6"


Inside Default.aspx.cs page ,if i displaying label value is 100 then on Default.aspx page it will display like this

flashvars.roomid="100"


Depending upon label value roomid want to change on aspx page..please tell me how to solve it.....
Posted
Updated 14-Jul-12 2:28am
v3
Comments
vivektiwari97701 13-Jul-12 10:35am    
update your question with code

or try

flashvars.roomid=textboxname.text
on
text change event and set autopostback=true of text box

make user control(.ascx) for flash

XML
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %>



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Scribblar Room</title>
<LINK href="http://media.muchosmedia.com/brainwave/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://media.muchosmedia.com/scribblar/scripts/includes.js"></script>
<script type="text/javascript">


    var targetID = "scribblar";
    var flashvars = {};
////    /* pass necessary variables to the SWF */
    flashvars.userid = "0";
    flashvars.username = "shiva";


    flashvars.roomid = prompt("Enter Room Id");


  //  flashvars.roomid = "label1.Text";


                                /* the roomid for the room you'd like to access - substitute this for a valid roomid */
    flashvars.preferredLocales = "en_US";                           /* sets the language - if in doubt leave as en_US */
    /* optional: if you pass userid=0 you may also pass a username to skip the username prompt and log the
    user in using that username
    flashvars.username = "John";    */
    var params = {};
    params.allowscriptaccess = "always";
    var attributes = {};
    attributes.id = "scribblar";
    attributes.name = "scribblar";
    swfobject.embedSWF("http://media.muchosmedia.com/scribblar/v2/main.swf", "alternate", "80%", "80%", "10.2.0", "http://media.muchosmedia.com/swfobject/expressInstall.swf", flashvars, params, attributes);


</script>
</head>
<body scroll="no">

<div id="alternate">
<a href="http://www.adobe.com/go/getflashplayer">This page requires the latest version of Adobe Flash. Please download it now.<br>
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash Player" />
    </a>
</div>


</body>
</html>


and add this control to aspx page

XML
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register src="WebUserControl.ascx" tagname="WebUserControl" tagprefix="uc1" %>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Scribblar Room</title>
<LINK href="http://media.muchosmedia.com/brainwave/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://media.muchosmedia.com/scribblar/scripts/includes.js"></script>

</head>
<body scroll="no">
    <form id="form1" runat="server">
<div id="alternate">
    <uc1:WebUserControl ID="WebUserControl1" runat="server" />
    <a href="http://www.adobe.com/go/getflashplayer"><br>
&nbsp;</a></div>
    <br />
    <!-- Codes by Quackit.com -->
<a href="javascript:location.reload(true)">Change RoomID</a>

    </form>
</body>
</html>
 
Share this answer
 
Use
document.getElementByID("Control Id").Value = Some value
 
Share this answer
 
Comments
ANOOP CL NAIR 14-Jul-12 1:14am    
i tried like that its not working...can u explain it...below code can see detail....
This my code in aspx page:

XML
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Scribblar Room</title>
<LINK href="http://media.muchosmedia.com/brainwave/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://media.muchosmedia.com/scribblar/scripts/includes.js"></script>
<script type="text/javascript">

    var targetID = "scribblar";
    var flashvars = {};
    /* pass necessary variables to the SWF */
    flashvars.userid = "0";
    flashvars.username = "shiva";
    flashvars.roomid = "sqc7jm6";


  //  flashvars.roomid = "label1.Text";


                                /* the roomid for the room you'd like to access - substitute this for a valid roomid */
    flashvars.preferredLocales = "en_US";                           /* sets the language - if in doubt leave as en_US */
    /* optional: if you pass userid=0 you may also pass a username to skip the username prompt and log the
    user in using that username
    flashvars.username = "John";    */
    var params = {};
    params.allowscriptaccess = "always";
    var attributes = {};
    attributes.id = "scribblar";
    attributes.name = "scribblar";
    swfobject.embedSWF("http://media.muchosmedia.com/scribblar/v2/main.swf", "alternate", "100%", "100%", "10.2.0", "http://media.muchosmedia.com/swfobject/expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body scroll="no">
    <form id="form1" runat="server">
<div id="alternate">
<a href="http://www.adobe.com/go/getflashplayer">This page requires the latest version of Adobe Flash. Please download it now.<br>
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash Player" />
    </a>
</div>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </form>
</body>
</html>







my problem is

flashvars.roomid = "sqc7jm6";

here roomid="sqc7jm6";

i want to chage roomid from textbox...if i give roomid =100 then it will show flashvars.roomid="100" in aspx page like that method i want.....

Thanks,
anoop
 
Share this answer
 
Comments
ANOOP CL NAIR 14-Jul-12 1:46am    
thank you very much yaar....its working....
can u please tell me how to solve it?
 
Share this answer
 
 
Share this answer
 
Comments
ANOOP CL NAIR 14-Jul-12 8:09am    
i tried it is not working properly.....can u please explain it....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900