troubleshooting Question

The name '###' does not exist in the current context

Avatar of rito1
rito1 asked on
.NET ProgrammingC#ASP.NET
4 Comments1 Solution634 ViewsLast Modified:
Hi All,

I have no idea why I am receiving the following errors when trying to compile/build website. The error is referring to all instances of

guide_border - GenericHTMLControl (<p> tag)
litWidth - Literal  control
litHeight - Literal control
linkReset - GenericHTMLControl (<a> tag)
linkSite - GenericHTMLControl (<a> tag)

I have attached my code behind

I have checked that my ASPX file is referencing the CodFile and Partial Class correctly.
I have also checked that all controls have an ID and the attribute runat="server".

These errors only occur which building the site. What actually viewing the page in the browser, all works fine... I am using Visual Studio 2008.

Can anyone see what would be causing this?

Many thanks,

public partial class ImageEditor : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
        ImageLiteral.Text = "<img src=\"/images_cust/templates/temp/" + Request.QueryString["f"] + "\" alt=\"" + Request.QueryString["tc"] + "\" id=\"i\" />";
        string strWidth = Request.QueryString["iw"];
        string strHeight = Request.QueryString["ih"];

        guide_border.Style.Add("width", strWidth + "px");
        guide_border.Style.Add("height", strHeight + "px");
        litWidth.Text = strWidth;
        litHeight.Text = strHeight;

        linkReset.HRef = "?f=" + Request.QueryString["f"] + "&tc=" +
            Request.QueryString["tc"] + "&p=" + Request.QueryString["p"] + "&iw=" + strWidth + "&ih=" + strHeight;

        linkSite.HRef = "/site/page.aspx?page=" + Request.QueryString["p"];
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros