简体   繁体   中英

asp.net 4.0 sys is undefined horror

[edit]: Figured out where it goes wrong. It has something to do with my Routing (note: im not using MVC but webforms).

Here's the little piece in my global.asax which causes it:

        routes.Add(
            "Home",
            new Route("{PageIndex}", new p7r.Routing.HomeRouteHandler())
        );

Now this is the route for the homepage so i can show pages like http://www.domain.com/1 , /2 etc. I don't know what's wrong with it, any ideas? Thanks

[/edit]

Hi all,

I have a question with possible 1000 answers but I have tried them all and none of them worked. Today my asp.net web application encountered the sys is undefined error. It was working fine before so something has changed but I have no idea what can causes this.

I'm using a scriptmanager placed in a masterpage. The error occurs on every content page. I've tried adding httphandlers in web.config and a couple of other things there but that did not solve the issue. I tried an empty webapplication with an empty web.config and there it worked flawless. I'm using asp.net routing too (webforms) but the problem also occurs on 'normal' .aspx pages.

I know it's not possible to answer this question but maybe you've encountered the similar problems so I'm looking for ideas which could be the cause.

Application keywords: -Webapplication -c# / asp.net 4.0 -webforms -master/content page -routing

Thank you for your time!

This is because you probably ask for the sys before you have declare it.

Ether move the Script Manager before your javascript, ether call the sys functions after page have been loaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM