```
final Dialog Alert_Dialog = new Dialog(MainList.this);
Alert_Dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
Alert_Dialog.setContentView(R.layout.alert_dialog_progressbar);
((TextView)Alert_Dialog.findViewById(R.id.txtMessage)).setText(R.string.please_wait_);
Alert_Dialog.setCancelable(false);
Alert_Dialog.show();
((Button) Alert_Dialog.findViewById(R.id.btnCancel)).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    Alert_Dialog.cancel();
   }
});

```

Then callin AsynTask like :

```
String res="";
try{
    SendingWebPageTask sendMaster=new SendingWebPageTask();
    res=sendMaster.execute(UrlMaster).get();
}catch (Exception e) {
e.printStackTrace();
}

```

i am returning value which url responding me on the base of responce i am calling second url but the problem it that when i am returning value from async task in this way it will not display an dialogbox and it will hang device till asynTask cannot complete its task so can any one help me.