I have created an `AsyncTsak` class in my project which downloads some information from web server. I am sure that it works well because when it is called by `onCreate()` , I can see the result . But unfortunately when I call it again via a button it doesn't work. 

I am not sure but i think i have read somewhere about this problem . It said , we are permitted to use AsyncTask class only once. 

`AsyncTask class`

```
class DownloadAdvertismentLevel2 extends AsyncTask<String,String,String>{
    String [] ImageInformation=null;
    protected void onPreExecute(){          
            // do nothing !             
        }
    protected String doInBackground(String...Urls){
        String Data="";
        HttpURLConnection urlConnection = null; 
        try{
            URL myUrl=new URL("http://10.0.2.2:80/Urgence/ads.aspx?Action=DownloadIds&TB="+TopBoundry+"&LB="+LowBoundry);
            urlConnection = (HttpURLConnection)myUrl.openConnection();      
            BufferedReader in = new BufferedReader (new InputStreamReader(urlConnection.getInputStream()));         
            String temp=""; 
            // Data is used to store Server's Response 
            while((temp=in.readLine())!=null)
            {               
                 Data=Data+temp;        
            }    
        }
        catch(Exception ex){
            Log.d("Er>doInBackground", ex.toString());
            urlConnection.disconnect(); 
        }
        finally{
            urlConnection.disconnect();
            }
            return Data;// it sends Result to onPostExcute 
        }
        protected void onPostExecute(String Data){
            createPhotoAlbum();
            pb.closedProg();
            }           
        }

```

`onCreate`

Here I don't have any problem . It works fine 

```
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ads);       
        new DownloadAdvertismentLevel2().execute();
    }

```

`Via Button`

```
 ButtonSeeMore.setOnClickListener(new View.OnClickListener(){
              public void onClick(View view) {
                  Counting();  
              }});

```

`Counting`

```
 public void Counting(){
            if(TotalRows-6>0){
                TopBoundry=TotalRows;
                LowBoundry=TotalRows-6;
                TotalRows=LowBoundry;
                }   
            new DownloadAdvertismentLevel2().execute();
        }

```

Please consider that I need to use this class till it shows the information. What would you suggest ?