3

I have some trouble, I think the problem is the Webresource.axd file. I am using ASP.NET Web Form with .NET 4.5 and Visual Studio 2012 Web Developer Express.

I declare in my aspx file an treeview, and in the codebehind I allocate data to the treeview. This is working, but there I became some missing pictures, but I use the standard Systemset. so it it shown in the Browser

Here are my code:

.aspx:

<asp:TreeView ID="treeview" runat="server" ShowLines="True" ImageSet="Arrows">

</asp:TreeView>

.aspx.cs:

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
       Logic.TreeView("FILE", treeview);
    }
}

web.config:

<?xml version="1.0" encoding="utf-8"?>

<!--
  Weitere Informationen zum Konfigurieren der ASP.NET-Anwendung finden Sie unter
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

    <configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />

      <httpHandlers>
        <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true"/>
      </httpHandlers>

  </system.web>
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    <standardEndpoints>
      <webHttpEndpoint>
        <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" crossDomainScriptAccessEnabled="true"/>
      </webHttpEndpoint>
      <webScriptEndpoint>
        <standardEndpoint crossDomainScriptAccessEnabled="true"/>
      </webScriptEndpoint>
    </standardEndpoints>
  </system.serviceModel>


  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>


</configuration>

When I start the debugging I get a JS error, but only in the IE, not in Chrome for example. run-time error in Microsoft JScript: "WebForm_InitCallback" ist undefined

Can someone help, I haven't really some idea how to solve the problem.

Higune
  • 643
  • 3
  • 13
  • 31

1 Answers1

0

Couple of simple things to try first:

Are the files in the location specified (perhaps use firebug or similar to to look at the elements to find the location, might be confused with ~/ ./ paths).

If you're using a server operating system then have you got "static content" role ticked in server manager, otherwise CSS and images won't be shown.

DomBat
  • 1,981
  • 5
  • 27
  • 42