By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

Why the server controls do not show?

P: n/a
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
Jan 5 '06 #1
Share this Question
Share on Google+
12 Replies


P: n/a
> 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?

Jan 5 '06 #2

P: n/a
Check that you have runat="server" on the missing controls.

"Doru Roman" <do*******@rogers.com> wrote in message
news:uy**************@TK2MSFTNGP14.phx.gbl...
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

Jan 5 '06 #3

P: n/a
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.
Jan 5 '06 #4

P: n/a
Sorry, it is
<html> not <htmlk>, my typo. It seems that IIS is incapable of dealing with
server controls
Jan 5 '06 #5

P: n/a
Ah, you've written sever instead of server - is this the case with all of
them?

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

"Doru Roman" <do*******@rogers.com> wrote in message
news:ez*************@TK2MSFTNGP14.phx.gbl...
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.

Jan 5 '06 #6

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

Jan 5 '06 #7

P: n/a
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.
Jan 5 '06 #8

P: n/a
> 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?

Jan 5 '06 #9

P: n/a
> <script runat="server"
</script>


You're missing a > at the end of the first line there; should be:

<script runat="server">
....
</script>

Jan 5 '06 #10

P: n/a
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.
Jan 5 '06 #11

P: n/a
> 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

Jan 5 '06 #12

P: n/a
Thank you very much, I registered again and it works now.
Jan 5 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.