Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
ASP.NET 2.0 / 3.5 / 4.0
Name '__o' not declared!?!?!
lunedì 17 novembre 2008 - 17.08
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
augusto890
Profilo
| Junior Member
161
messaggi | Data Invio:
lun 17 nov 2008 - 17.08
Ciao a tutti ragazzi...come avete letto nel titolo mi appare quell'errore praticamente ovunque...non mi ha mai dato problemi...ma oggi ho 98 errori di quel tipo...e praticamente mi blocca il programma...qualcuno sa darmi una soluzione??? che errore è???
Anonimo
Profilo
| Senior Member
392
messaggi | Data Invio:
lun 17 nov 2008 - 20.42
Ti cito un post che puoi trovare a questo url:
http://forums.asp.net/p/923745/1266105.aspx
[citazione]
[...]
We have finally obtained reliable repro and identified the underlying issue. A trivial repro looks like this:
<% if (true) { %>
<%=1%>
<% } %>
<%=2%>
In order to provide intellisense in <%= %> blocks at design time, ASP.NET generates assignment to a temporary __o variable and language (VB or C#) then provide the intellisense for the variable. That is done when page compiler sees the first <%= ... %> block. But here, the block is inside the if, so after the if closes, the variable goes out of scope. We end up generating something like this:
if (true) {
object @__o;
@__o = 1;
}
@__o = 2;
The workaround is to add a dummy expression early in the page. E.g. <%="" %>. This will not render anything, and it will make sure that __o is declared top level in the Render method, before any potential ‘if’ (or other scoping) statement.
[/citazione]
augusto890
Profilo
| Junior Member
161
messaggi | Data Invio:
mar 18 nov 2008 - 09.09
L'ho già trovato anke io quel post...ho eseguito.-..ma non è cambiato nnt...
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !