A strange HTML rendering for a datalist?

G

Guest

Hi,

I have a datalist in an aspx file. Everything was fine, and I just wanted to
change a background color.

Suddenly from a one moment, the datalist is not rendered on the screen
anymore, while the application is running. When I check source output, there
is no code for a datalist (table).

I don’t understand what happened, as the HTML code seems to be fine.

Here is the simplified version of my datalist. What is weird, when I put the
breakpoint into Page_Load method in a code behind file, the application will
not stop there, like the code would not be running.

<body>
<form id="articles" method="post" runat="server">
<mnbr:mainbar id="Mainbar1" runat="server"></mnbr:mainbar><br>
<asp:datalist id="ArticlesList" runat="server" Width="223px"
Font-Names="Arial" Font-Size="10pt" HorizontalAlign="Left" CellSpacing="1"
CellPadding="0" SelectedItemStyle-BackColor="dimgray" EnableViewState="false"
Visible="true">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</ItemTemplate>
</asp:datalist>
</form>
</body>

Does anybody have any suggestion please? Is it VS related problem? i am
using MS VC 2002.


Thanks,

Lubomir
 
M

Matt Berther

Hello Lubomir,

Check the OnInit section of your code and make sure that they Page_Load event
is still wired up.
 
G

Guest

Hello Matt,

Thanks for an idea. Yup, it was it. The handler registration was missing. I
don't understand why it was deleted...

Anyway, it works now again.

Lubos
 

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

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,323
Latest member
XOBJamel3

Latest Threads

Top