FAQ Database Discussion Community


VB.NET redirection loop error

asp.net,redirect,webforms,infinite-loop,response.redirect
I have the following code on my multilingual website: (MasterPage.master.vb) Dim pageUrl As String = HttpContext.Current.Request.Url.AbsolutePath Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Dim strLanguage As String = Session("Language") If Not IsPostBack Then Response.Redirect(String.Format("{0}?Language={1}", pageUrl, strLanguage)) End If Response.Write(String.Format("{0}?Idioma={1}", pageUrl, strLanguage)) End Sub It will display the...

Rails RSpec testing a simple link redirect_to path

ruby-on-rails,rspec,tdd,capybara,response.redirect
I am having difficulty writing an RSpec test in a rails app to make sure that a simple link from my app's homepage redirects to the about page. I have the following in my feature test file: scenario "Have links redirect to the correct paths" do visit '/' click_link('about') expect(response).to...