html - Cannot access non-static field "Repeater" in static context -


I have a web project project where I use a repeater; This is the code on the page:

  & lt; asp: repeater id = "repeater 1" runat = "server" & gt; & Lt; ItemTemplate & gt; & Lt; Div class = "events" & gt; & Lt; Div class = "" & gt; & Lt; H3 & gt; & Lt; A href = "& lt;% # DataBinder.Eval (container.detime," url ")%>" & Gt; & lt;% # DataBinder.Eval (container.datetime, "name")% & gt; & Lt; / A & gt; & Lt; / H3 & gt; & Lt; Span & gt; & lt;% # DataBinder.Eval (container.ditem, "location")%>. & Lt;% # DataBinder.Eval (container.detime, "datidysplay")% & gt; & Lt; / Span & gt; & Amp; Nbsp; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: Repeater & gt;   

and here is codebehind:

  namespace testWebForms {public partial category event search search results: System.Web.UI.Page {public string search terms { Get; Set; } Secure Zero Page_load (Object Sender, EventsErgus E) {var query = HTTPS Constant. Present. Request. Cootstrings; var searchTerms = String.IsNullOrEmpty (query ["q"])? String.pti: query ["q"]; ArrayList value = new ArrayList (); Values.Add (new event) (name = "1715 300 reunion class", location = "Cambridge, MA", datepress = "20 May 2015", URL = "#"}); Values.Add (new event) (name = "seminar on proper cat petting techniques", location = "Boston, MA", datepress = "25 December 2014", url = "#"}); values.Add (new event) (name = "puppies everywhere !!!", location = "Cambridge, MA", datepress = "12 November 2014", url = "#"}); Repeater 1 Data source = value; Repeater1.DataBind ();   

This works fine.

Then I started a new project (a long story, but basically I need the files Project 2, but I am unable to see the site in Project 2, so I need to see it in Project 1 Created and then copied it to Project 2 when it was done)

The files are actually the same (except the webpage's namespace). But repeater is not working in Project 2. In Codebehind, Representative 1 has a red graph, and it says, "Can not reach nonstandard area" repeater "in steady reference".

How can I fix it, and why will it work in a project on earth, but not others? I thought it when I copied it to a new file, the new file that was "Codebahinded" Instead of using "codefile" The problem was fixed to replace CodeBehind

  & lt;% @page language = "c #" autowantwireup = "true" codebahind = "event search search results. Espx.cs" inherits = "WebAssetsTemplates_Event Search Results"%>    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -