.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Response.Redirect problem in Google Chrome

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :ASP.Net
I'm building an ASP.NET 3.5 webapplication using VB.NET, and I'm having problems redirecting to another URL when using Google Chrome. Other browsers like IE and Firefox are fine.My data entry forms all have an OK and an Cancel button, which are both handled server-side. The Cancel button just redirects back to the originating page, while the OK button will add or update a database record and then redirect to the originating page.The redirect to the originating page is done by calling the following shared sub on a general utilities class in my appication: Shared Sub Redirect(ByVal p_sURL As String) Dim l_sURL As String = p_sURL.ToLower If Left(l_sURL, 1) = "~" Then Dim l_oControl As New System.Web.UI.Control l_sURL = l_oControl.ResolveUrl(l_sURL) End If If Left(l_sURL, 1) <> "/" Then If Left(l_sURL, 7) <> "http://" AndAlso Left(l_sURL, 8) <> "https://" Then l_sURL = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) & wsUtils.SiteRoot & l_sURL End If End If HttpContext.Current.Response.Redirect(l_sURL) 'HttpContext.Current.Response.Redirect(l_sURL, False) End Sub As you can see, I've tried using the extra argument in the Response.Redirect call, but that

View Complete Post

More Related Resource Links

Autocompleteextender problem in google chrome

Hi, I've used autocompleteextender inside a repeater control. On OnClientItemSelected event of autocompleteextender i am setting some hidden field value to use it on server. The code is working fine in all browsers except google chrome. Actually when i traced the code, event is occuring and hidden field is getting value set but the hidden field value is not appearing on the server. On the server i got empty hidden field.  

GridView and mouse double click Response.Redirect problem


VS 2005, AJAX 

I use gridview and I need single and double click for each row in gridview.

When I click once on a row, some action will execute (e.g. next button should be enabled) and when I double click the row there should be redirection to another page.

I used the code below for both single and double click  usage:


protected void GwContainers_RowDataBound(object sender, GridViewRowEventArgs e)
                if (e.Row.RowType == DataControlRowType.DataRow)
                    // Get the LinkButton control in the first cell

                    LinkButton singleClickButton = (LinkButton)e.Row.Cells[8].Controls[0];
                    // Get the javascript which is assigned to this LinkButton


Response.Redirect slow


I'm in the middle of migrating servers and on the new server Response.Redirect is extremely slow. It takes around 20 seconds for the browser to get the redirect. This is something that was quick on the existing server. It's an ASP.NET 2.0 application, both servers are running IIS6.

Additionally, if I "manually" do the redirect, it's fast. For example:

Existing way:


takes around 20 seconds on the new server

New way:

Response.Status = "302 Moved Temporarily";
Response.AddHeader("Location", url);

is fast on the new server.

Any ideas why Response.Redirect would be so slow on the new server?



I need to open a new window with Response.Redirect, Is it possible?

Adding a cookie to a response.redirect vs. httpWebRequest


Hello, I will try to be as clear as I can be.  I'm sure this question has been asked but I can't find a suitable answer for this particular situation.

I need to be able to redirect the browser to a new 3rd party page while at the same time supplying a cookie required for some form of authentication on the 3rd party site.

I have managed to get this to work in the following manner:


'SessionID is predetermined by another HttpWebRequest/Response  

Dim sessionCookie As New Cookie("ezproxy", sessionID.Substring(1), "/", ".someother.site")

Dim CookieJar As New CookieContainer


rRequest = HttpWebRequest.Create("where I want to go")

rRequest.CookieContainer = CookieJar

rRequest.Method = "GET"


'Make the request and get the response.

rResponse = rRequest.GetResponse()


'Save cookie(s)

If (rResponse.Cookies.Count <> 0) Then

For Each cook

Problem with Mobility Redirect


I recently tried to activate the MobilityRedirect feature in order to let users type /m to get the mobile view of a site.  It works fine on the base site of my site collection but nowhere else. I used the following command in stsadm:

stsadm -o activatefeature -name MobilityRedirect -url http://(my server name)

Am I missing something really silly?  I can't imagine that I have to activate it on each site individually.

Exit Popup and response.redirect

Hi, I have a requirement to show an Exit Popup on one of our processing pages. I am showing the exit popup by registering a client side javascript like window.onbeforeunload = ShowExitPopUp(); The popup executes fine if you close the window, or try to type in a different URL. However the issue is that my processing page is also performing a "Response.Redirect" on the server side once the process completes. When response.redirect happens the exitpopup also shows up. Is there a way to have the exit popup not show up in that case? Since my server side code is running through an UpdatePanel, so I have tried registering the following, in an attempt to remove ExitPopup from client side. However this doesn't work since server side redirection happens before end request. Sys.WebForms.PageRequestManager.getInstance().add_endRequest(RemoveExitPopup); Has anyone faced a similar situation and handled it?

Adjacent combo boxes take space according to their data on google chrome

I have a page where I want to keep several combo boxes adjacent to each other. I have put them in divs that are floated left.This works fine in IE, Firefox. But when I render the same page on Chrome I observe the uneven gap between combo boxes. Upon analysis I found out that each combo box is occupying space based on the data inside it.This happens because on Safari and Chrome, the option list control is placed differently as compared to that on IE and Firefox.Please see the following code from ComboBox.pre.js (in AjaxControlToolkit source/Server/) // force inline display on Safari by moving the list to the bottom of the form. if (Sys.Browser.agent === Sys.Browser.Safari || Sys.Browser.agent === Sys.Browser.WebKit) { this.get_element().removeChild(optionListControl); var parent = this.get_element().parentNode; while (typeof (parent) != typeof (document.forms[0])) { parent = parent.parentNode } var safariListContainer = document.createElement('div'); safariListContainer.className = this.get_element().className; safariListContainer.appendChild(optionListControl); parent.appendChild(safariListContainer); } This is how it looks:I have tried doing the following but none of them helped:Changed the RenderMode of combo box to 'block' fro

Response.Redirect("URL") and target="_blank"

in codebehid  I use Response.Redirect(http://www.google.com.hk/) I want the google page is open in a new Win ,did not cove my page, in html we can use target="_blank" How can I hadle it in Redirect? Thank you

What is the difference between Server.Transfer & response.Redirect()

Hello Friends,This is the very favourate question available on every interview questions site.I have searched for it. But didnt get the satisfactory practical difference between these two.Please show me the difference between this two through a working sample demo.Please ilustrate it through a simple sample.

Response.Redirect in new browser window

   protected void ddlPrint_Changed(object sender, EventArgs e)     {         if (ddlPrint.SelectedValue == "All Agenda Items")         {             Response.Redirect(string.Format("{0}?{1}", SettingsRepository.ReportingURL,                                             Utils.EncryptQueryString("ReportName=AgendaItem.rpt")));         }How can I open following report in new browser window using response.redirect? Thx   protected void ddlPrint_Changed(object sender, EventArgs e)    {        if (ddlPrint.SelectedValue == "All Agenda Items")        {            Response.Redirect(string.Format("{0}?{1}", SettingsRepository.ReportingURL,                                            Utils.EncryptQueryString("ReportName=AgendaItem.rpt")));        }}

Response.Redirect in C# for page to page parameter passing

Looking for examples of this, but can't find anything specific. I'm new to ASP.NET, and C# at the same time... so I'm struggling to get it right...  Thanks, Nick

maintainscrollpositiononpostback is not working in Google Chrome 5.0.353.70 beta

All --I think that sometimes maintainscrollpositiononpostback is not working in Google Chrome 5.0.353.70 beta.Has anyone else experienced this?Does anyone have a fix for this?Does anyone have an alternative for this?Please advise.Thank you.-- Mark Kamoski


Hi..Is it possible to go to the previous page from wherever we are currently is, using the Response.Redirect()?

Response.Redirect is not working with UpdatePanel

 Response.Redirect is not working with UpdatePanelafter migrating a web site to ASP.NET version 4.please help urgent

Problem with closing window in ie 6 sp 3 after download using Response.BinaryWrite

Hi all, I currently having problems in closing a page that launches a download (using Response.BinaryWrite) opened using IE 6 sp 3. All other versions of IE it closes fine. This page was opened using window.open. Below is a sample code of what i am trying to achieve: protected void Page_Load(object sender, EventArgs e) { Response.Clear(); //Specify the document type. Response.ContentType = "application/word"; //Specify how the document is sent to the browser. Response.AddHeader("content-disposition", "attachment; filename=MyDasddsaocument.doc"); //Get data bytes from the file and send it to the response. byte[] bytes = System.IO.File.ReadAllBytes(@"C:\\Temp\\in.doc"); Response.BinaryWrite(bytes); Response.End(); Page.ClientScript.RegisterStartupScript(this.GetType(), "CloseMe", "window.close();", true); } I hope someone can help me with this issue. Thank you in advance.

redirect to site by Callback (Google checkout)

Hi i am getting all callbacks from google checkout...now what i need to do is :when i click on button to place order, if suceed then redirects me to thank you pagei dont want to go on thank you page, on clicking on button i should be redirected to mysite..i am getting each status in callback page, so what can i do when order is placed, to redirect to mysiteThanks in advance
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend