# ASP Variable to Dynamic text

**URL:** https://forum.kirupa.com/t/asp-variable-to-dynamic-text/165822
**Category:** flash
**Created:** [October 14, 2005, 5:28am UTC](https://forum.kirupa.com/t/asp-variable-to-dynamic-text/165822 "2005-10-14T05:28:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![redppelmo](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@redppelmo](https://forum.kirupa.com/u/redppelmo)
#### Post date: [October 14, 2005, 5:28am UTC](https://forum.kirupa.com/t/asp-variable-to-dynamic-text/165822/1 "2005-10-14T05:28:18Z")

</div>

Hi,

Just want ot know if anyone know how to do this?  
I have a ASP script:

```auto
 <%  
[size=-1]Set fs = CreateObject("Scripting.FileSystemObject")[/size] 
[size=-1]Wfile=server.mappath("\") & "[color=#ff0000]\cgi-bin\counter304882.txt[/color]"[/size] 
[size=-1]on error resume next[/size] 
[size=-1]Set a = fs.OpenTextFile(Wfile)[/size] 
[size=-1]hits = Clng(a.ReadLine)[/size] 
[size=-1]hits = hits + 1[/size] 
[size=-1]a.close[/size] 

[size=-1]if error then[/size] 
[size=-1]hits = 1[/size] 
[size=-1]end if[/size] 

[size=-1]Set a = fs.CreateTextFile(Wfile,True)[/size] 
[size=-1]a.WriteLine(hits)[/size] 
[size=-1]a.Close[/size] 
[size=-1]%>[/size] 
  [size=-1]Number of hits: <% =hits %>[/size]

 

```

I would like the variable hits to be loaded in a dynamic text does anyone knows how to do this?

Thanks.
