Welcome Guest Search | Active Topics | Sign In | Register

The website XXX can't been opened - CallBack Redirect Options
Patrick Beverloo
Posted: Wednesday, July 4, 2007 3:56:31 AM

Rank: Advanced Member
Groups: Member

Joined: 5/30/2007
Posts: 42
When I use the callback panel to show a progress bar when i press on the Save button and in the code behind I do a CallBackPanel Redirect I get a message box, about IE not being able to open the webpage. (best translation: The website XXX can't been opened. De oparation is aborted. whit a critical icon.)

If I don't use the callback panel i don't get te message. Also it only happens with largs amount of data.

Code Sample
HTML

<tr>
<td class="TextInfo" colspan="2" style="text-align: right; height: 30px;">
<asp:ValidationSummary ID="Summary" runat="server" />
<asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/Lib/Icons/24x24/disk_blue.gif"
OnClick="btnSave_Click" />
<asp:Image ID="btnCancel" runat="server" ImageUrl="~/Lib/Icons/24x24/error.gif" />
</td>
</tr>
<tr>
<td colspan="2">
<eo:CallbackPanel runat="server" ID="cpPB" Triggers="{ControlID:btnSave;Parameter:}"
Width="100%" LoadingHTML="<img src='../../../Lib/Images/progress1.gif' />">
</eo:CallbackPanel>
</td>
</tr>

C#
protected void btnSave_Click(object sender, ImageClickEventArgs e)
{
OfficeWeb.Sys.Project.Copy Copy = new OfficeWeb.Sys.Project.Copy();
Copy.ProjectId = new Guid(ViewState["DataKey"].ToString());
Copy.ProjectName = txtProjectName.Text;
Copy.ProjectStartDate = txtStartdate.SelectedDate;
Copy.ProjectEndDate = txtEnddate.SelectedDate;
Copy.OrderNumber = txtOrderNumber.Text;
Copy.DepartmentId = new Guid(ddDepartment.SelectedValue);

if (Copy.CopyProject())
cpPB.Redirect("CopySubProject.aspx?DataKey=" + ViewState["DataKey"].ToString() + "&Project=" + Copy.ProjectId.ToString());
}


Patrick Beverloo
OfficeSpecialisten www.OfficeSpecialisten.nl




eo_support
Posted: Wednesday, July 4, 2007 8:46:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
hi, Patrick

I will try your code and see what I can find.

Thanks.
eo_support
Posted: Wednesday, July 4, 2007 10:29:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
hi, Patrick

I tried your code, and I set the redirect to google, yahoo, or one of my page in my proejct, it works fine.
Mine is like that:
this.CallbackPanel1.Redirect("FormSubTab.aspx?ID=yadayada&Key=something");
or
this.CallbackPanel1.Redirect("http://www.google.com");
Can you make sure the CopySubProject.aspx page is ok? Or try to replace it with another page and see if the Redirect works. And also, make sure the whole URL string is right, like:
string strURL = CopySubProject.aspx?DataKey=" + ViewState["DataKey"].ToString() + "&Project=" + Copy.ProjectId.ToString(); //Here, make sure the strURL is correct.
cpPB.Redirect(strURL);

Thanks.

Patrick Beverloo
Posted: Wednesday, July 4, 2007 11:49:04 AM

Rank: Advanced Member
Groups: Member

Joined: 5/30/2007
Posts: 42
The URL is correct, it works when CopySubProject.aspx has a small amount of data to show. When i want to show a page with a large amount of data ( 60+ Datarow in a ASP:Repeater) this happends.

O, also this does not happens whitin VS 2005. Only on the live website. (sorry, forgot about this part)

Patrick Beverloo
OfficeSpecialisten www.OfficeSpecialisten.nl




eo_support
Posted: Wednesday, July 4, 2007 1:49:32 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
hmmm, yeah, I tried it in VS2005, and did not see any problem.
Are you using IIS6 in your web server? Is there anyway you can give me a test link to your page in live website, I can redirect to your page and see if I can find anything?

Thanks.
Patrick Beverloo
Posted: Wednesday, July 4, 2007 1:54:37 PM

Rank: Advanced Member
Groups: Member

Joined: 5/30/2007
Posts: 42
System:
Windows 2003 Server
IIS 6
Framework 2.0

About the link I have to ask my bose and customer, but I don't think this is a option. I will try.



Patrick Beverloo
OfficeSpecialisten www.OfficeSpecialisten.nl




eo_support
Posted: Wednesday, July 4, 2007 9:14:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Patrick,

One thing that you can try is to remove the redirect part first and verify it works or not.

If that works, you can try the following workaround:

1. Add a client side ClientSideAfterUpdate handler;
2. Inside your server side Callback_Execute event hanlder, set e.Data property to the Url that you want to redirect to;

Inside your ClientSideAfterUpdate handler, you will get the Url that you put in e.Data via extraData parameter. Once you have that, you can use window.open to open the new Url from the client side.

Thanks




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.