A
Aparna
I have windows xp professional as my OS , IIS 5.5 installed
Now when later I installed ASP.NET then my aspx.net files dont work.In
the sense only HTML part is displayed but vb script(dot net) part does
not get displayed.
For Example
following is the timedisplay.aspx code
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="TimeDisplay.aspx.vb" Inherits="Diary.TimeDisplay"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>TimeDisplay</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:Label id="displayLabel" style="Z-INDEX: 100; LEFT: 26px;
POSITION: absolute; TOP: 70px" runat="server" Width="273px">A Simple
Web Form Example</asp:Label>
<asp:Label id="timeLabel" style="Z-INDEX: 102; LEFT: 27px;
POSITION: absolute; TOP: 172px" runat="server"
Width="176px"></asp:Label>
</form>
</body>
</HTML>
The code behind file i.e. Timedisplay.aspx.vb for above aspx file is
Public Class TimeDisplay
Inherits System.Web.UI.Page
Protected WithEvents displayLabel As
System.Web.UI.WebControls.Label
Protected WithEvents timeLabel As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
timeLabel.Text =
String.Format("{0
2}:{1
2}{2
2}",DateTime.Now.Hour,
DateTime.Now.Minute, DateTime.Now.Second)
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
End Class
the output in the browser is
A Simple Web Form Example
Where as the expected output shud be
A Simple Web Form Example
10.23.14
that is both text and time.
Only text that is HTML part is displayed but time that is vb.net part
is not displayed..
I have tried a number of examples, but in all only HTML part works
like the one above.
Please give possible solutions to this problem.I cant proceed just
because of this
Now when later I installed ASP.NET then my aspx.net files dont work.In
the sense only HTML part is displayed but vb script(dot net) part does
not get displayed.
For Example
following is the timedisplay.aspx code
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="TimeDisplay.aspx.vb" Inherits="Diary.TimeDisplay"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>TimeDisplay</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:Label id="displayLabel" style="Z-INDEX: 100; LEFT: 26px;
POSITION: absolute; TOP: 70px" runat="server" Width="273px">A Simple
Web Form Example</asp:Label>
<asp:Label id="timeLabel" style="Z-INDEX: 102; LEFT: 27px;
POSITION: absolute; TOP: 172px" runat="server"
Width="176px"></asp:Label>
</form>
</body>
</HTML>
The code behind file i.e. Timedisplay.aspx.vb for above aspx file is
Public Class TimeDisplay
Inherits System.Web.UI.Page
Protected WithEvents displayLabel As
System.Web.UI.WebControls.Label
Protected WithEvents timeLabel As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
timeLabel.Text =
String.Format("{0
DateTime.Now.Minute, DateTime.Now.Second)
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
End Class
the output in the browser is
A Simple Web Form Example
Where as the expected output shud be
A Simple Web Form Example
10.23.14
that is both text and time.
Only text that is HTML part is displayed but time that is vb.net part
is not displayed..
I have tried a number of examples, but in all only HTML part works
like the one above.
Please give possible solutions to this problem.I cant proceed just
because of this