473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Name '___o' is not declared

What is this? I can't get rid of it. I've seen articles that say I
should add something like <% ="" %at the top of the page and I've
done that, but these errors won't go away and they actually appear to
the user on the website.

How do I get rid of these errors? (asp.net v2)
Thanks

Sep 14 '06 #1
7 2627
Check out:
http://blogs.msdn.com/mikhailarkhipo...20/580165.aspx

As far as I'm concerned, the real solution though is not to use <% %in
your pages. Where/why are you using them? There are very few good reasons to
use <% %in ASP.NET.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Fred Flintstone" <id**********@nospam.comwrote in message
news:45********************************@4ax.com...
What is this? I can't get rid of it. I've seen articles that say I
should add something like <% ="" %at the top of the page and I've
done that, but these errors won't go away and they actually appear to
the user on the website.

How do I get rid of these errors? (asp.net v2)
Thanks

Sep 14 '06 #2
I checked the page, it tells me to use <% ="" %and the errors
persist. (it's placed right after the body tag).

Where are they used? The entire site is in 2 languages. All
graphics, all text and any other elements (buttons, etc) need decision
makers in the code;

<% if session("Language") = "E" then %>
English Blurb <IMG SRC="EnglishImage.jpg">
<% else %>
French Blurb <IMG SRC="FrenchImage.jpg">
<% end if %>

What would be the 'better ' way?
Thanks for the reply

On Thu, 14 Sep 2006 10:10:55 -0400, "Karl Seguin [MVP]" <karl REMOVE @
REMOVE openmymind REMOVEMETOO . ANDME netwrote:
>Check out:
http://blogs.msdn.com/mikhailarkhipo...20/580165.aspx

As far as I'm concerned, the real solution though is not to use <% %in
your pages. Where/why are you using them? There are very few good reasons to
use <% %in ASP.NET.

Karl
Sep 14 '06 #3
On Thu, 14 Sep 2006 Karl Seguin [MVP] <karlwrote:
Check out:
http://blogs.msdn.com/mikhailarkhipo...20/580165.aspx

As far as I'm concerned, the real solution though is not to use <% %in
your pages. Where/why are you using them? There are very few good reasons to
use <% %in ASP.NET.
no offence, but that's not true at all. There are some cases when you
can't simply insert a web form control into a page to solve a particular
problem.
e.g.
in a datalist itemtemplate I have:

<ItemTemplate>
<table>
<tr onclick='toggle(<%# DataBinder.Eval(Container.DataItem, "id")%>)' >
....

I can't simply stick a 'literal' into the <trtag .. in addition I'm
not going render the table through a literal since that makes it
difficult for the designers to work on the html (without having to edit
it through code)

I can think of 100s of reasons for using <% %in asp.net
--

fiddlewidawiddum
Sep 14 '06 #4
Databinding and code evaluation are totally different things. They serve
different purposes, are executed at different points in the page lifecycles,
and one is deprecated whle the other s not.
<%# BIND STUFF % is fine

<% dim x as string = Request.Querystring("asdassd")
if (x = "asdas") then
....
%>

is not.

The only time I've used <% %is when I'm interacting with javascrit and I
want to do:

var c = document.getElementById("<%=control.ClientId%>);

And by the way, you CAN stick a literal in the <tdtag and hook into the
DataBinding and DataCreated events...which you SHOULD do for anything but
the simplest of databinding.

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Stimp" <re*@spumco.comwrote in message
news:sl****************@murphy.redbrick.dcu.ie...
On Thu, 14 Sep 2006 Karl Seguin [MVP] <karlwrote:
>Check out:
http://blogs.msdn.com/mikhailarkhipo...20/580165.aspx

As far as I'm concerned, the real solution though is not to use <% %in
your pages. Where/why are you using them? There are very few good reasons
to
use <% %in ASP.NET.

no offence, but that's not true at all. There are some cases when you
can't simply insert a web form control into a page to solve a particular
problem.
e.g.
in a datalist itemtemplate I have:

<ItemTemplate>
<table>
<tr onclick='toggle(<%# DataBinder.Eval(Container.DataItem, "id")%>)' >
...

I can't simply stick a 'literal' into the <trtag .. in addition I'm
not going render the table through a literal since that makes it
difficult for the designers to work on the html (without having to edit
it through code)

I can think of 100s of reasons for using <% %in asp.net
--

fiddlewidawiddum

Sep 14 '06 #5
It's ironic that I happened to answer this question...

http://openmymind.net/index.aspx?documentId=3
http://openmymind.net/index.aspx?documentId=4
http://openmymind.net/index.aspx?documentId=52

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Fred Flintstone" <id**********@nospam.comwrote in message
news:cr********************************@4ax.com...
>I checked the page, it tells me to use <% ="" %and the errors
persist. (it's placed right after the body tag).

Where are they used? The entire site is in 2 languages. All
graphics, all text and any other elements (buttons, etc) need decision
makers in the code;

<% if session("Language") = "E" then %>
English Blurb <IMG SRC="EnglishImage.jpg">
<% else %>
French Blurb <IMG SRC="FrenchImage.jpg">
<% end if %>

What would be the 'better ' way?
Thanks for the reply

On Thu, 14 Sep 2006 10:10:55 -0400, "Karl Seguin [MVP]" <karl REMOVE @
REMOVE openmymind REMOVEMETOO . ANDME netwrote:
>>Check out:
http://blogs.msdn.com/mikhailarkhipo...20/580165.aspx

As far as I'm concerned, the real solution though is not to use <% %in
your pages. Where/why are you using them? There are very few good reasons
to
use <% %in ASP.NET.

Karl

Sep 14 '06 #6
Cool, I see what you're saying. There's only 2 problems:

- You can't use localization for Canadian French. French Canadians
will flip out completely if even one accent is off and they all agree
that the MS implementation of Canadian French is not entirely correct.
We have to use the text they send us or they lose it. I mean, flaming
four letter emails if one character is off. I do use localization but
only for date and time formats.

- I can't re-write the entire application to simply solve the ___o
problem.

- Those docs are all in C#, I'm in vb.

I'll repost the question.
Thanks anyways.
On Thu, 14 Sep 2006 14:17:00 -0400, "Karl Seguin [MVP]" <karl REMOVE @
REMOVE openmymind REMOVEMETOO . ANDME netwrote:
>It's ironic that I happened to answer this question...

http://openmymind.net/index.aspx?documentId=3
http://openmymind.net/index.aspx?documentId=4
http://openmymind.net/index.aspx?documentId=52

Karl
Sep 14 '06 #7
Fred:

Those 3 documents were written specifically based on my experience creating
multilingual sites for the Canadian Government (as well as a number of
triligual sites). You obviously brushed over it very quickly - there is no
automatic translation going on...the cultures are just used to identify
which xml file/database to pull the CUSTOM content from. Localization
doesn't mean automatic translation...localization is exactly what you are
doing...targetting for specific locales, your way just isn't very good.

2 - The application was poorly written...whether you wrote it or someone
else did, .NET is being used in a poor way.

3 - The examples are fully available in VB.NET. The difference between C#
and VB.NET is so minimal that all developers should be able to easily pick
up either language within hours.

Best of luck with your problem,

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Fred Flintstone" <id**********@nospam.comwrote in message
news:9g********************************@4ax.com...
Cool, I see what you're saying. There's only 2 problems:

- You can't use localization for Canadian French. French Canadians
will flip out completely if even one accent is off and they all agree
that the MS implementation of Canadian French is not entirely correct.
We have to use the text they send us or they lose it. I mean, flaming
four letter emails if one character is off. I do use localization but
only for date and time formats.

- I can't re-write the entire application to simply solve the ___o
problem.

- Those docs are all in C#, I'm in vb.

I'll repost the question.
Thanks anyways.
On Thu, 14 Sep 2006 14:17:00 -0400, "Karl Seguin [MVP]" <karl REMOVE @
REMOVE openmymind REMOVEMETOO . ANDME netwrote:
>>It's ironic that I happened to answer this question...

http://openmymind.net/index.aspx?documentId=3
http://openmymind.net/index.aspx?documentId=4
http://openmymind.net/index.aspx?documentId=52

Karl

Sep 14 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Pete Mahoney | last post by:
I am currently working on an ASP page where I create a lot of different check boxes. I have some checkboxes that are Windows platforms and some that are solaris platforms. I want a control...
4
by: Dan Jacobson | last post by:
Using <A name="x_y-z"></A>, I even get nervous about the _ and -. w3-recs/RECS/html4/struct/links.html seems to say all of ascii is cool and beyond. Anyway, just what is the safe range for...
8
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
20
by: Jim Ford | last post by:
I understand that some compilers define a symbol that can be used anywhere in the code in order to find out, at run time, the name of the file where the code corresponding to the current execution...
3
by: Mark Oliver | last post by:
Hi, Is there any way to get the declaration name of a parameter either through reflection, StackFrame, or something else? Thanks, Mark
0
by: Guoqi Zheng | last post by:
Dear sir, I am very new to asp.net. I often meet a problem of name 'xxx' is not declared. can some one tell me what is the problem? For example, my following code gives me an error of "Name...
13
by: Don | last post by:
How do I get an Enum's type using only the Enum name? e.g. Dim enumType as System.Type Dim enumName as String = "MyEnum" enumType = ???(enumName)
4
by: andrew | last post by:
Hi, I have routinely added anchors to pages using both name and id: <a name="example" id="example"></a> under the possibly mistaken assumption that at some stage "name" might be deprecated...
0
by: padmagvs | last post by:
I have a wsdl something like this <?xml version="1.0" ?> <definitions targetNamespace="http://abc.com/namespace/wsif/samples/abc" xmlns:tns="http://abc.com/namespace/wsif/samples/abc"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.