G
Guest
I have code which checks whether a datagrid is empty and if it is it shows a
panel on my page. If its not empty then Im using the server.transfer to go to
another page so as im able to use the items in an array list. My problem is
that I also have had to incorporate some Javascript to see whether the user
is ok with moving forward. Everything is fine and works apart from when the
user clicks cancel on the pop-up Internet Explorer window it stills lets them
move on. I need to be able to introduce something which keeps the user on the
same page if they click cancel.
Has anyone any idea how I can achieve this or if this is possible in my
circumstances.
private void checkdgSearchResults()
{
if(this.DataGrid1.Items.Count == 0)
{
this.pnlSearchAddresses.Visible = true;
}
else
{
ArrayList addresses;
addresses = (ArrayList) ViewState["Addresses"];
Context.Items["TransferAddresses"] = addresses;
string surname = this.Textbox7.Text;
Context.Items["test"] = surname;
Response.Write("<script language='JavaScript'>(window.confirm('The
search fee will now be deducted for the criteria entered. Do you wish to
continue?'));</script>");
Server.Transfer("ArrayListItemsDisplayed.aspx");
}
}
panel on my page. If its not empty then Im using the server.transfer to go to
another page so as im able to use the items in an array list. My problem is
that I also have had to incorporate some Javascript to see whether the user
is ok with moving forward. Everything is fine and works apart from when the
user clicks cancel on the pop-up Internet Explorer window it stills lets them
move on. I need to be able to introduce something which keeps the user on the
same page if they click cancel.
Has anyone any idea how I can achieve this or if this is possible in my
circumstances.
private void checkdgSearchResults()
{
if(this.DataGrid1.Items.Count == 0)
{
this.pnlSearchAddresses.Visible = true;
}
else
{
ArrayList addresses;
addresses = (ArrayList) ViewState["Addresses"];
Context.Items["TransferAddresses"] = addresses;
string surname = this.Textbox7.Text;
Context.Items["test"] = surname;
Response.Write("<script language='JavaScript'>(window.confirm('The
search fee will now be deducted for the criteria entered. Do you wish to
continue?'));</script>");
Server.Transfer("ArrayListItemsDisplayed.aspx");
}
}