Parameter in URL is coming null

Asked

Viewed 57 times

0

I have a page that will call another as below.

if (hdfCdTipoStatus.Value == "2")
    Response.Redirect("/frmANACadastroBens.aspx?/CdProcesso=" +   RetornaProcessoUltimaAnalise(int.Parse(hdfCdUsuario.Value)), false);

It turns out that in the page Load frmANACadastroBens.aspx i try to catch the parameter passed by the calling page, so:

if (Request["CdProcesso"] != null)
                    {
                        hdfCdProcesso.Value = Request["CdProcesso"];
                    }

What happens is that the moment I pass the parameter on the calling page, the parameter is not null and the page called is. How I get this parameter at the time the page is being loaded.

  • Try it this way, Response.Redirect("/frmANACadastroBens.aspx? Cdprocesso="

  • The process as it is when the page is displayed appears. In Pageload is that I am not able to catch and I need it in load

  • Did redirect this way? without the / before the ?

  • Put as an answer to close the post. It worked and did not even realize that there was a bar. It is the pressure of managers here, rs.

  • ready, I’ve already put as an answer

1 answer

2


Mount the redirect url this way

if (hdfCdTipoStatus.Value == "2")
    Response.Redirect("/frmANACadastroBens.aspx?CdProcesso=" +   RetornaProcessoUltimaAnalise(int.Parse(hdfCdUsuario.Value)), false);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.