Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Timer Help - <asp: controls not showing up 1

Status
Not open for further replies.

TWillard

Programmer
Apr 26, 2001
263
US
I have an asp page that is rendering, however the <asp: controls are not showing up. This is the first ASP.NET page I have written, so I am not sure where to start looking for problems.

* I am running Windows2000 with IIS 5
* I am using Visual Studio .NET as my IDE
* .aspx file is running off of the virtual server
* .aspx file is located under * .aspx file renders html, but <asp:Button is not showing
* <asp:Button visible property is set to true
* I have used the Build and Browse command in VS and get the same problem as I do in a IE browser session.
* Code is listed below



<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft Visual Studio.NET 7.0&quot;>
<meta name=&quot;CODE_LANGUAGE&quot; content=&quot;Visual Basic 7.0&quot;>
<meta name=&quot;vs_defaultClientScript&quot; content=&quot;JavaScript&quot;>
<meta name=&quot;vs_targetSchema&quot; content=&quot;</HEAD>
<body MS_POSITIONING=&quot;GridLayout&quot;>
<form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;>
<h3>Enter your name and click the button!</h3>
<asp:TextBox id=&quot;txtName&quot; style=&quot;Z-INDEX: 101; LEFT: 34px; POSITION: absolute; TOP: 48px&quot; runat=&quot;server&quot; Width=&quot;156&quot; Height=&quot;24&quot;></asp:TextBox>
<asp:Label id=&quot;lblLabel1&quot; style=&quot;Z-INDEX: 103; LEFT: 34px; POSITION: absolute; TOP: 136px&quot; runat=&quot;server&quot; Width=&quot;156px&quot; Height=&quot;24px&quot;></asp:Label>
<asp:Button id=&quot;btnClickHere&quot; style=&quot;Z-INDEX: 102; LEFT: 34px; POSITION: absolute; TOP: 93px&quot; runat=&quot;server&quot; Text=&quot;Click Here&quot; Width=&quot;156px&quot; Height=&quot;24px&quot;></asp:Button>
</form>
</body>
</HTML>


THANKS!
 
try and make the form tag an ASP form tag instead of an HTML from tag.

Kris
 
Still no change. The code above was entirely written by Visual Studio. I simply placed the controls on the web form and wrote the commands for the onclick event of the button to display the name entered in the text box.

My gut feeling teels me I am dealing with a setup of the .NET framework or structure, i.e. something outside of code errors. I just don't know where to start looking.
 
Well...

Here is the first ASP.NET page I ever made (on monday). I know it works, so see if it works on your computer.

<%@ Page Language=&quot;VB&quot; %>
<script runat=&quot;server&quot;>

Sub Page_Load(Source As Object, E As EventArgs)
TimeLabel.Text = DateTime.Now.ToString()
End Sub

</script>
<html>
<head>
<title>
My first ASPX Page
</title>
</head>
<body>
<br>
<p>Hello There!</p>

<p>The time is now: <asp:Label runat=&quot;server&quot; id=&quot;TimeLabel&quot; /></p>

</body>
</html>
 
no it is not working. I get an error message stating that a semicolon is needed at

line 7
char 9
expected ';'.

It gives no more details other than to say that a script error has occured.

Thanks,
 
See this.
If you instaled IIS after .Net it is defimnitely the problem.
Run it aspnet_regiis.exe whether or not you reintalled IIS after .NET. It will not hurt. I had the same problem. Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
JohnYingling,

Thank you so much. That was exactly what I needed. I had Visual Studio installed on my computer by someone else several weeks ago and I had not attempted to write any .net code until now. In the meantime, I added IIS throught the Add/Remove Windows Components Wizard, so that I could create some ASP pages on the fly locally.

My page appears to be working fine now. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top