# LoadVars problem - works only once

**URL:** https://forum.kirupa.com/t/loadvars-problem-works-only-once/239001
**Category:** flash
**Created:** [September 17, 2007, 9:08pm UTC](https://forum.kirupa.com/t/loadvars-problem-works-only-once/239001 "2007-09-17T21:08:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![win6565](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@win6565](https://forum.kirupa.com/u/win6565)
#### Post date: [September 17, 2007, 9:08pm UTC](https://forum.kirupa.com/t/loadvars-problem-works-only-once/239001/1 "2007-09-17T21:08:46Z")

</div>

I’m trying to create a basic interaction between flash and [ASP.net](http://ASP.net) v1.1.

In flash code I’m using the LoadVars function and on [asp.net](http://asp.net) page I’m using “Response.write” to return the value to flash.  
I have a flash button which send the load to the [asp.net](http://asp.net).

MY CODE WORKS , BUT ONLY ONE TIME!  
(meaning the first time I click the button , the [asp.net](http://asp.net) page is called and return the value , but the second time nothing happens!)

Here is my code:

## FLASH:

```auto
 function doCheck()
{    
    checkSessID = new LoadVars();    
    checkSessID.onLoad = function (serverIsOnline)      
   { 
 
      if (this.success == "true") 
     { 
     } // end if  
   }; 
 
checkSessID.load("http://" + "localhost/FlashTest" + "/IM/IMService.aspx?command=validateuser&sessID=" + "1" + "&username=" + myName);
 
}

```

[ASP.net](http://ASP.net):

* * *

```auto
 private void SendResponse()
{    
 
string result = "true";    
Response.Clear();    
Response.Write(String.Format("&success={0}&", result) );    
Response.Flush();    
return;
 
}

```

The first time in click on the flash button the doCheck() function is called and the sendResponse function (which is in the “IMService.aspx”) return the value to flash.  
Then , when clicking the second time on the button , nothing happens

Any idea why this works only once?

THANKS!
