Asp.net Response.redirect在url错误400中放入额外字符

Asp.net Response.redirect在url错误400中放入额外字符,asp.net,response.redirect,Asp.net,Response.redirect,我正在尝试在按钮单击事件服务器端使用response.redirect,但它给了我http 400错误请求错误。我以前没有遇到这个错误,但我只是将项目移动到vs 2010 framework 4.0,我开始遇到这个错误。 这就是我要写的: protected void bOrganizationAddID_Click(object sender, EventArgs e) { string MyURL; MyURL = "addNewPopup.aspx

我正在尝试在按钮单击事件服务器端使用response.redirect,但它给了我http 400错误请求错误。我以前没有遇到这个错误,但我只是将项目移动到vs 2010 framework 4.0,我开始遇到这个错误。 这就是我要写的:

 protected void bOrganizationAddID_Click(object sender, EventArgs e)
    {
        string MyURL;
        MyURL = "addNewPopup.aspx?orgID=" + this.OrganizationID;

        Response.Redirect(MyURL);



    }
当我尝试构建它时,页面上显示的错误url是:

而不仅仅是: localhost:2504/padrap/pages/admin/addNewPopup.aspx?orgID=33

有人能帮我吗。如何获得重定向以将我带到正确的url?
谢谢

试试--Server.UrlEncode(this.OrganizationID)

所以,我认为这是4.0或其他版本中的一个bug,因为我尝试了所有的方法。但解决办法是:

ScriptManager.RegisterStartupScript(this, this.GetType(), 
           "redirectFixOrg", string.Format("document.location = '{0}?orgID={1}'",
           this.ResolveClientUrl("~/pages/admin/addNewPopup.aspx"), this.OrganizationID), true);
这对我有效,但我不知道为什么response.redirect不起作用

谢谢