Linkbutton in deploy does not work RRS feed

  • Question

  • User1715553281 posted


    I've published my projetcs that contains some web pages. When I access the pages in deploy everything works fine, but when I click on a linkbutton that should redirect me to another page I get this 404 message: The requested resource is not available.

    Something is wrong in the code behind when I set the link for linkbutton, how can I fix it?

    Friday, June 21, 2013 10:05 AM


All replies

  • User1320044578 posted

    you have used response.redirect in your code behind ?

    Can you show what you have written in code behind.

    Friday, June 21, 2013 10:33 AM
  • User1715553281 posted

    Yes, indeed in localhost it works fine, but not in production. This is the oncommand function:

    public void linkbtn_oncommand(object sender, CommandEventArgs e)
                id = Convert.ToInt32(e.CommandArgument);
                string UrlPath = System.Web.HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority;
                string link = UrlPath + "/Informations/Details.aspx?id=" + id.ToString();

    Friday, June 21, 2013 10:36 AM
  • User1320044578 posted

    when you click on linkbutton it will take you in other link can you share which link it takes you in browser

    Friday, June 21, 2013 12:27 PM
  • User1715553281 posted

    I solved my problem replacing linkbutton with href or hyperlink in the aspx page. You can give a look to this link if you need!


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 24, 2013 8:02 AM