# RE: DYNAMIC TEXT to work with ASP.NET CODE

**URL:** <https://forum.kirupa.com/t/re-dynamic-text-to-work-with-asp-net-code/246731>\
**Category:** Uncategorized\
**Created:** [December 13, 2007, 9:44pm UTC](https://forum.kirupa.com/t/re-dynamic-text-to-work-with-asp-net-code/246731 "2007-12-13T21:44:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel2008](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@daniel2008](https://forum.kirupa.com/u/daniel2008)\
**Post date:** [December 13, 2007, 9:44pm UTC](https://forum.kirupa.com/t/re-dynamic-text-to-work-with-asp-net-code/246731/1 "2007-12-13T21:44:13Z")

</div>

Hello.

I downloaded a Kirupa .fla source file that covered dynamic text. I am trying to get it to work with [asp.net](http://asp.net) code.

I am modifying the file so that it works with a .ascx or .ascx.vb file (I actually do not know which one to use, I believe it is the .ascx.vb code because the .ascx seems to be an include control file that calls the .ascx.vb code and diplay in the page where ever the class code is placed into any [asp.net](http://asp.net) file).

I am trying to use the id or lbl id from the .ascx or .ascx.vb file to display into the Flash Dynamic text boxes in the .fla file. but it does not work.

Here is the .fla file I am working with:  
**loadText = new LoadVars();**  
**loadText.load("/DVDEV/BVModules/Controls/CartTotals.ascx.vb");**  
**loadText.onLoad = function() {**  
**lblItemCount.Text = this.lblItemCount;**  
**lblSubTotal.Text = this.lblSubTotal;**  
**};**

Here is the **CartTotals.ascx** file code:  
**\<%@ Control Language=“VB” AutoEventWireup=“false” CodeFile=“CartTotals.ascx.vb” Inherits=“BVModules\_Controls\_CartTotals” %\>**  
**\<%@ Register Assembly=“Anthem” Namespace=“Anthem” TagPrefix=“anthem” %\>**  
**\<div id=“carttotals” runat=“server”\>\<span id=“items”\>\<anthem:Label runat=“server” ID=“lblItemCount” AutoUpdateAfterCallBack=“true”\>1 Product\</anthem:Label\>\</span\>&nbsp;\<span id=“subtotal”\>\<anthem:Label runat=“server” ID=“lblSubTotal” AutoUpdateAfterCallBack=“true”\>\</anthem:Label\>\</span\>\</div\>**

Here is the **CartTotals.ascx.vb** file code:  
**Imports BVSoftware.Bvc5.Core**  
**Partial Class BVModules\_Controls\_CartTotals**  
**Inherits System.Web.UI.UserControl**  
**Protected Sub Page\_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender**  
**If SessionManager.CurrentCartID = String.Empty Then**  
**lblItemCount.Text = 0 & " " & Content.SiteTerms.GetTerm(“Products”)**  
**lblSubTotal.Text = String.Format("{0:c}", 0)**  
**Else**  
**If SessionManager.CurrentShoppingCart.TotalQuantity \> 1 Then**  
**lblItemCount.Text = SessionManager.CurrentShoppingCart.TotalQuantity.T oString(“0”) & " " & Content.SiteTerms.GetTerm(“Products”)**  
**Else**  
**lblItemCount.Text = SessionManager.CurrentShoppingCart.TotalQuantity.T oString(“0”) & " " & Content.SiteTerms.GetTerm(“Product”)**  
**End If**  
**lblSubTotal.Text = String.Format("{0:c}", SessionManager.CurrentShoppingCart.SubTotal)**  
**End If**  
**End Sub**  
**End Class**

Can someone please help or if you encountered an similiar problem, Let me know what I should do, or if I should post this on an [asp.net](http://asp.net) forum instead?

Thank you,  
Dan:ear:

here is a screenshot of what I am trying to do:  
 ![](http://www.auragentech.com/troubleshoots/aspnetandflashdynamiccontent.jpg)
