Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!

Posted

Heres the code thats generated qhen I add a textbox and a button:

 

<%@ 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">
		 
		<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.

Posted

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 ;)

Posted

Ok. Here it is, but I guess its the same.

 

<%@ 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>

Posted

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"

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...