473,406 Members | 2,698 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,406 software developers and data experts.

Errors - two more

I succeeded in putting up a datalist with thumbnails, four to a row. I put
the height and width in the rows and invoked them in the aspx file with:

<asp:Image ID="Image1" runat="server" Width=<%#
Container.DataItem("TheWidth").ToString() %>
Height=<%# Container.DataItem("TheHeight").ToString() %>
ImageUrl='<%# Container.DataItem("TheFile") %>' />

Error #1:
Note: This Worked! However, when I build the page I get errors:

Validation (ASP.Net): Attribute values must be enclosed in quotation marks.

for each of Width and Height. If I try to enclose the <% %with either
single or double quotes, I get exception errors and it doesn't work. Does
anyone know how to get rid of the errors, yet still have it work?

Error #2:
When I try to add a validation control (either required or range), it
doesn't come up with an ID automatically. When I manually put one in, there
are no properties appearing in the property box. The hint says:

"Element 'RequiredFieldValidator' is not a known element. This can occur if
there is a compilation error in the Web Site, or the web.config file is
missing."

The web.config file is present, and on another page the validator comes up
with properties in the properties box.

Could these two errors be related?

--
Shelly

P.S. At one point I got an error message that <ItemTemplatecould not be
nested within a datalist control. That went away after I moved the end
datalist line and then moved it right back to where it had been??????
Sep 13 '07 #1
2 2133
I "solved" Error #2. I had been placing the validation control right after
the TableCell that housed the control I was going to validate. By moving
the validation control outside of the table of controls, it popped up
normally. I have NO idea why it shouldn't be allowed where I had it.

--
Shelly

"Shelly" <sh*******@asap-consult.comwrote in message
news:13*************@corp.supernews.com...
>I succeeded in putting up a datalist with thumbnails, four to a row. I put
the height and width in the rows and invoked them in the aspx file with:

<asp:Image ID="Image1" runat="server" Width=<%#
Container.DataItem("TheWidth").ToString() %>
Height=<%# Container.DataItem("TheHeight").ToString() %>
ImageUrl='<%# Container.DataItem("TheFile") %>' />

Error #1:
Note: This Worked! However, when I build the page I get errors:

Validation (ASP.Net): Attribute values must be enclosed in quotation
marks.

for each of Width and Height. If I try to enclose the <% %with either
single or double quotes, I get exception errors and it doesn't work. Does
anyone know how to get rid of the errors, yet still have it work?

Error #2:
When I try to add a validation control (either required or range), it
doesn't come up with an ID automatically. When I manually put one in,
there are no properties appearing in the property box. The hint says:

"Element 'RequiredFieldValidator' is not a known element. This can occur
if there is a compilation error in the Web Site, or the web.config file is
missing."

The web.config file is present, and on another page the validator comes up
with properties in the properties box.

Could these two errors be related?

--
Shelly

P.S. At one point I got an error message that <ItemTemplatecould not be
nested within a datalist control. That went away after I moved the end
datalist line and then moved it right back to where it had been??????

Sep 13 '07 #2
Shelly,
what it is saying is that you need to do stuff like so:

Height='<%# Container.DataItem("TheHeight").ToString() %>'

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Shelly" wrote:
I succeeded in putting up a datalist with thumbnails, four to a row. I put
the height and width in the rows and invoked them in the aspx file with:

<asp:Image ID="Image1" runat="server" Width=<%#
Container.DataItem("TheWidth").ToString() %>
Height=<%# Container.DataItem("TheHeight").ToString() %>
ImageUrl='<%# Container.DataItem("TheFile") %>' />

Error #1:
Note: This Worked! However, when I build the page I get errors:

Validation (ASP.Net): Attribute values must be enclosed in quotation marks.

for each of Width and Height. If I try to enclose the <% %with either
single or double quotes, I get exception errors and it doesn't work. Does
anyone know how to get rid of the errors, yet still have it work?

Error #2:
When I try to add a validation control (either required or range), it
doesn't come up with an ID automatically. When I manually put one in, there
are no properties appearing in the property box. The hint says:

"Element 'RequiredFieldValidator' is not a known element. This can occur if
there is a compilation error in the Web Site, or the web.config file is
missing."

The web.config file is present, and on another page the validator comes up
with properties in the properties box.

Could these two errors be related?

--
Shelly

P.S. At one point I got an error message that <ItemTemplatecould not be
nested within a datalist control. That went away after I moved the end
datalist line and then moved it right back to where it had been??????
Sep 13 '07 #3

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

Similar topics

10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
6
by: Shabam | last post by:
A web application of mine developed using C# + MS SQL runs fine normally. However when I stress test it with a load testing software (using about 60 simultaneous users) some instances start...
8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
4
by: Dave | last post by:
Hi folks, I am trying to develop a routine that will handle sphere-sphere and sphere-triangle collisions and interactions. My aim is to develop a quake style collision engine where a player can...
4
by: atv | last post by:
Whatis the proper way to handle errors from function calls? For example, i normally have a main function, with calls to mine or c functions. Should i check for errors in the functions called...
24
by: Massimo Soricetti | last post by:
Hello, I'm not a C newbie, but I'm teaching C programming (well... FIRST programming and then C) to other guys these days and it's driving me to some reflexions on the language. It's not...
3
by: sklett | last post by:
This BUG that is so ridiculous I can't believe they shipped 05 is making my life hell. I have tried the various solutions found on the web and none of them have worked thus far. What's even more...
24
by: pat | last post by:
Hi everyone, I've got an exam in c++ in two days and one of the past questions is as follows. Identify 6 syntax and 2 possible runtime errors in this code: class demo {
3
by: clintonb | last post by:
Some programmers, and even Microsoft documents, say you should only throw exceptions for exceptional situations. So how are others handling all the other unexceptional errors? How are you...
11
by: Howard Kaikow | last post by:
I'm using the code below, but an error is not getting trapped. Where can such errors occur? In another process? Try SomeCode Catch ex As Exception Dim strMsg() As String = Split(ex.ToString,...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.