Web Forms

Cassio

Well-known member
Joined
Nov 30, 2002
Messages
276
Location
Rio de Janeiro
Hi! I was trying to do my first ASP application using Web Forms controls. The problem is that when I run the app internet explorer wont show the controls (textbox, button). The only thing that appears is the label. When I check the html code it was all there.
What is happening?

Thanks!
 
Check your html code in browser, there must be something wrong to cause your controls disappear. Or paste your source here, let us find for you
 
Heres the code thats generated qhen I add a textbox and a button:

Code:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body ms_positioning="GridLayout">
		<form id="Form1" method="post" runat="server">
			&nbsp;
			<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 145px; POSITION: absolute; TOP: 130px" runat="server" Width="181px" Height="25px"></asp:TextBox>
			<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 179px; POSITION: absolute; TOP: 172px" runat="server" Width="106px" Text="Button"></asp:Button></form>
	</body>
</HTML>

When I put this code in a html file, it runs completly blank.
 
This should look ok...

The problem is that when I run the app internet explorer wont show the controls (textbox, button). The only thing that appears is the label. When I check the html code it was all there.


Right click your browser and view the source, because this is the source that browser understand and display to you ;)
 
Ok. Here it is, but I guess its the same.

Code:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 94px; POSITION: absolute; TOP: 51px" runat="server" Width="162px" Height="26px"></asp:TextBox>
			<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 131px; POSITION: absolute; TOP: 96px" runat="server" Height="23px" Width="100px" Text="Button"></asp:Button>
		</form>
	</body>
</HTML>
 
Problem solved! The problem was that I had installed IIS after installing VS.NET. So I had to fix the .NET Framework. The help says:


Insert the Visual Studio .NET Windows Component Update CD, and then on the Start menu choose Run:

<CDDrive>:\dotNetFramework\dotnetfx.exe /t:c:\temp /c:"msiexec.exe /fvecms c:\temp\netfx.msi"
 
I think you misunderstanding me, I want the client source, not server source. but never mind, since the problem was solve.
 
He gave you the client source. IIS wasnt parsing the .aspx extension, meaning the output sent to the client is the exact same as the contents of the .aspx file.
 
Derek Stone, I think this time you are wrong, because I quite sure this is not client source, maybe you also misunderstand me.

From the first line
<VB>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1"%>
</VB>

We can sure there is server source, in client site (browser) we cannot see the <% in source view because server was process it and generate the HTML source to client.
 
I had installed IIS after installing VS.NET
The whole point is the server didnt process it. The ASP.NET ISAPI DLL wasnt installed, meaning IIS didnt have any verbs to parse for the .aspx extension.
 
Back
Top