Errors - two more

S

Shelly

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 <ItemTemplate> could 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??????
 
S

Shelly

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top