Why the server controls do not show?

D

Doru Roman

Hi,

I try to use WEB Controls on the ASP application but when I try to display
them on the WEB they don't show.
It's only the HTML controls that show only.
Thanks,
Doru
 
P

Paul Henderson

I try to use WEB Controls on the ASP application but when I try to display
them on the WEB they don't show.
It's only the HTML controls that show only.

Can you please post an example of some code that is failing to display
the controls correctly?
 
D

Doru Roman

Thanks Sosh and Paul for the reply.
I use the runat="server"
Here is an example:

<%@ Page Language="VB" %>
<script runat="server"
sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASP.NET"
end sub
</script>

<htmlk><body>

<asp:Label id="lblMessage" runat="sever" />
</body></html>

This was created in a text editor, but it same happens when I use Studio
..Net (2002) to create an ASP project.
 
D

Doru Roman

Sorry, it is
<html> not <htmlk>, my typo. It seems that IIS is incapable of dealing with
server controls
 
S

Sosh

Ah, you've written sever instead of server - is this the case with all of
them?

<asp:Label id="lblMessage" runat="sever" />
 
D

Doru Roman

The ASP application has the right spelling.
This is the part that the IIS is not recognizing:
<asp:Label id="lblMessage" runat="server" />
 
D

Doru Roman

What I noticed is if I take out this
<script runat="server"
</script>

and in the HTML body I have regular html controls they show, but if I put
the script tag back they dissapear from the page.
It seems that the <script> is something that triggers the whole problem.
 
P

Paul Henderson

The ASP application has the right spelling.
This is the part that the IIS is not recognizing:
<asp:Label id="lblMessage" runat="server" />

What appears in the source code shown from the browser - do the
<asp:label ... /> tags exist there, or have they been stripped ?

If they *are* there, then ASP.NET can't be set up to parse pages
properly for your application. Do you have any other working ASP.NET
apps on your server?
 
D

Doru Roman

I made the correction, but no change, here is what the source code returns:

<%@ Page Language="VB" %>
<script runat="server">
sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASP.NET"
end sub
</script>

<html><body>
test<P>test again
<asp:Label id="lblMessage" runat="server" />
</body></html>

which means the script is not recognized. Only the "test<P>test again" is
shown with the paragraph in between.
 
P

Paul Henderson

I made the correction, but no change

Is ASP.NET definitely installed correctly?
Try running
aspnet_regiis -u
then
aspnet_regiis -i

to re-register it with IIS.

Then, confirm that an ASP.NET tab is displayed in your IIS application
property pages
 

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

Staff online

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top