I have an asp.net webform. When I view the page in the web browser, the html
is returned but not any asp code, i.e., " <% ... %> ".
This same code works in the "old" asp page BUT NOT in asp.net.
See code below:
_______________ _______________ _______________ _______________ _____-
<form action="intro2. aspx" method="post">
<h3>Name: <input id="Name" type="text"> Category:
<select id="Category" size="1">
<option>psychol ogy</option>
<option>busines s</option>
<option>popular _comp</option>
</select>
</h3><input type="submit" value="Lookup">
<p>
<% Dim I As Integer
For I = 0 to 7 %>
<font size="<%=I%>">W elcome to ASP.NET </font>
<br>
<% Next %>
</form>
_______________ _______________ _______________ _______________ _ 6 1397
I have a Ferrari. I took the engine out of my Volkswagon and put it in the
Ferrari. Now the Ferrari doesn't run. Why doesn't my Ferrari run with a
Volkswagon engine?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message
news:D4******** *************** ***********@mic rosoft.com... I have an asp.net webform. When I view the page in the web browser, the html is returned but not any asp code, i.e., " <% ... %> ".
This same code works in the "old" asp page BUT NOT in asp.net.
See code below:
_______________ _______________ _______________ _______________ _____-
<form action="intro2. aspx" method="post"> <h3>Name: <input id="Name" type="text"> Category:
<select id="Category" size="1"> <option>psychol ogy</option> <option>busines s</option> <option>popular _comp</option> </select>
</h3><input type="submit" value="Lookup"> <p>
<% Dim I As Integer For I = 0 to 7 %> <font size="<%=I%>">W elcome to ASP.NET </font> <br> <% Next %>
</form>
_______________ _______________ _______________ _______________ _
"Kevin Spencer" wrote: I have a Ferrari. I took the engine out of my Volkswagon and put it in the Ferrari. Now the Ferrari doesn't run. Why doesn't my Ferrari run with a Volkswagon engine?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message news:D4******** *************** ***********@mic rosoft.com...I have an asp.net webform. When I view the page in the web browser, the html is returned but not any asp code, i.e., " <% ... %> ".
This same code works in the "old" asp page BUT NOT in asp.net.
See code below:
_______________ _______________ _______________ _______________ _____-
<form action="intro2. aspx" method="post"> <h3>Name: <input id="Name" type="text"> Category:
<select id="Category" size="1"> <option>psychol ogy</option> <option>busines s</option> <option>popular _comp</option> </select>
</h3><input type="submit" value="Lookup"> <p>
<% Dim I As Integer For I = 0 to 7 %> <font size="<%=I%>">W elcome to ASP.NET </font> <br> <% Next %>
</form>
_______________ _______________ _______________ _______________ _
This asp CODE does not work either. Only the HTML code is returned.
See Code below
_______________ _______________ _______________ _______________ _
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form5.aspx.vb"
Inherits="WebAp plicationLPM.We bForm5"%>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim MyConnection As New
System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated
Security=SSPI;P ersist Security Info=False;Init ial Catalog=pubs;Da ta
Source=CGLA;Tru sted_Connection =yes")
Dim MyCommand As New System.Data.Sql Client.SqlComma nd("select * from
Authors", MyConnection)
MyConnection.Op en()
Dim dr As System.Data.Sql Client.SqlDataR eader =
MyCommand.Execu teReader()
MyDataGrid.Data Source = dr
MyDataGrid.Data Bind()
MyConnection.Cl ose()
End Sub
</script>
'______________ _______________ _______________ _______________ _________-
<HTML>
<body>
<h3><font face="Verdana"> Simple Select to a DataGrid Control</font></h3>
<ASP:DataGrid id="MyDataGrid " runat="server" Width="700"
BackColor="#ccc cff" BorderColor="bl ack" ShowFooter="fal se" CellPadding="3"
CellSpacing="0" Font-Name="Verdana" Font-Size="8pt"
HeaderStyle-BackColor="#aaa add" EnableViewState ="false" />
</body>
</HTML>
_______________ _______________ _______________ _______________ This asp.net CODE does not work either. Only the HTML code is returned.
See Code below
_______________ _______________ _______________ _______________ _
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form5.aspx.vb"
Inherits="WebAp plicationLPM.We bForm5"%>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim MyConnection As New
System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated
Security=SSPI;P ersist Security Info=False;Init ial Catalog=pubs;Da ta
Source=CGLA;Tru sted_Connection =yes")
Dim MyCommand As New System.Data.Sql Client.SqlComma nd("select * from
Authors", MyConnection)
MyConnection.Op en()
Dim dr As System.Data.Sql Client.SqlDataR eader =
MyCommand.Execu teReader()
MyDataGrid.Data Source = dr
MyDataGrid.Data Bind()
MyConnection.Cl ose()
End Sub
</script>
'______________ _______________ _______________ _______________ _________-
<HTML>
<body>
<h3><font face="Verdana"> Simple Select to a DataGrid Control</font></h3>
<ASP:DataGrid id="MyDataGrid " runat="server" Width="700"
BackColor="#ccc cff" BorderColor="bl ack" ShowFooter="fal se" CellPadding="3"
CellSpacing="0" Font-Name="Verdana" Font-Size="8pt"
HeaderStyle-BackColor="#aaa add" EnableViewState ="false" />
</body>
</HTML>
_______________ _______________ _______________ _______________
"Kevin Spencer" wrote:
I have a Ferrari. I took the engine out of my Volkswagon and put it in the Ferrari. Now the Ferrari doesn't run. Why doesn't my Ferrari run with a Volkswagon engine?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message news:D4******** *************** ***********@mic rosoft.com...I have an asp.net webform. When I view the page in the web browser, the html is returned but not any asp code, i.e., " <% ... %> ".
This same code works in the "old" asp page BUT NOT in asp.net.
See code below:
_______________ _______________ _______________ _______________ _____-
<form action="intro2. aspx" method="post"> <h3>Name: <input id="Name" type="text"> Category:
<select id="Category" size="1"> <option>psychol ogy</option> <option>busines s</option> <option>popular _comp</option> </select>
</h3><input type="submit" value="Lookup"> <p>
<% Dim I As Integer For I = 0 to 7 %> <font size="<%=I%>">W elcome to ASP.NET </font> <br> <% Next %>
</form>
_______________ _______________ _______________ _______________ _
I saw it.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message
news:9C******** *************** ***********@mic rosoft.com...
"Kevin Spencer" wrote:
I have a Ferrari. I took the engine out of my Volkswagon and put it in the Ferrari. Now the Ferrari doesn't run. Why doesn't my Ferrari run with a Volkswagon engine?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message news:D4******** *************** ***********@mic rosoft.com... >I have an asp.net webform. When I view the page in the web browser, the >html > is returned but not any asp code, i.e., " <% ... %> ". > > This same code works in the "old" asp page BUT NOT in asp.net. > > > See code below: > > _______________ _______________ _______________ _______________ _____- > > <form action="intro2. aspx" method="post"> > <h3>Name: <input id="Name" type="text"> Category: > > <select id="Category" size="1"> > <option>psychol ogy</option> > <option>busines s</option> > <option>popular _comp</option> > </select> > > </h3><input type="submit" value="Lookup"> > <p> > > <% Dim I As Integer > For I = 0 to 7 %> > <font size="<%=I%>">W elcome to ASP.NET </font> > <br> > <% Next %> > > </form> > > _______________ _______________ _______________ _______________ _ > > This asp CODE does not work either. Only the HTML code is returned.
See Code below
_______________ _______________ _______________ _______________ _
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form5.aspx.vb" Inherits="WebAp plicationLPM.We bForm5"%> <script language="VB" runat="server"> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here Dim MyConnection As New System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=pubs;Da ta Source=CGLA;Tru sted_Connection =yes")
Dim MyCommand As New System.Data.Sql Client.SqlComma nd("select * from Authors", MyConnection) MyConnection.Op en() Dim dr As System.Data.Sql Client.SqlDataR eader = MyCommand.Execu teReader() MyDataGrid.Data Source = dr
MyDataGrid.Data Bind() MyConnection.Cl ose() End Sub </script>
'______________ _______________ _______________ _______________ _________-
<HTML> <body>
<h3><font face="Verdana"> Simple Select to a DataGrid Control</font></h3>
<ASP:DataGrid id="MyDataGrid " runat="server" Width="700" BackColor="#ccc cff" BorderColor="bl ack" ShowFooter="fal se" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaa add" EnableViewState ="false" />
</body> </HTML>
_______________ _______________ _______________ _______________
>> This asp.net CODE does not work either. Only the HTML code is returned.
Does the page have a ".aspx" extension? Are you requesting it via HTTP? Is
ASP.Net registered on your machine?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message
news:62******** *************** ***********@mic rosoft.com... This asp.net CODE does not work either. Only the HTML code is returned.
See Code below
_______________ _______________ _______________ _______________ _
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form5.aspx.vb" Inherits="WebAp plicationLPM.We bForm5"%> <script language="VB" runat="server"> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here Dim MyConnection As New System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=pubs;Da ta Source=CGLA;Tru sted_Connection =yes")
Dim MyCommand As New System.Data.Sql Client.SqlComma nd("select * from Authors", MyConnection) MyConnection.Op en() Dim dr As System.Data.Sql Client.SqlDataR eader = MyCommand.Execu teReader() MyDataGrid.Data Source = dr
MyDataGrid.Data Bind() MyConnection.Cl ose() End Sub </script>
'______________ _______________ _______________ _______________ _________-
<HTML> <body>
<h3><font face="Verdana"> Simple Select to a DataGrid Control</font></h3>
<ASP:DataGrid id="MyDataGrid " runat="server" Width="700" BackColor="#ccc cff" BorderColor="bl ack" ShowFooter="fal se" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaa add" EnableViewState ="false" />
</body> </HTML>
_______________ _______________ _______________ _______________
"Kevin Spencer" wrote:
I have a Ferrari. I took the engine out of my Volkswagon and put it in the Ferrari. Now the Ferrari doesn't run. Why doesn't my Ferrari run with a Volkswagon engine?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message news:D4******** *************** ***********@mic rosoft.com... >I have an asp.net webform. When I view the page in the web browser, the >html > is returned but not any asp code, i.e., " <% ... %> ". > > This same code works in the "old" asp page BUT NOT in asp.net. > > > See code below: > > _______________ _______________ _______________ _______________ _____- > > <form action="intro2. aspx" method="post"> > <h3>Name: <input id="Name" type="text"> Category: > > <select id="Category" size="1"> > <option>psychol ogy</option> > <option>busines s</option> > <option>popular _comp</option> > </select> > > </h3><input type="submit" value="Lookup"> > <p> > > <% Dim I As Integer > For I = 0 to 7 %> > <font size="<%=I%>">W elcome to ASP.NET </font> > <br> > <% Next %> > > </form> > > _______________ _______________ _______________ _______________ _ > >
I got it to work.
I registered the aspnet_regiis.e xe -i
"Kevin Spencer" wrote: This asp.net CODE does not work either. Only the HTML code is returned.
Does the page have a ".aspx" extension? Are you requesting it via HTTP? Is ASP.Net registered on your machine?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message news:62******** *************** ***********@mic rosoft.com... This asp.net CODE does not work either. Only the HTML code is returned.
See Code below
_______________ _______________ _______________ _______________ _
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form5.aspx.vb" Inherits="WebAp plicationLPM.We bForm5"%> <script language="VB" runat="server"> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here Dim MyConnection As New System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=pubs;Da ta Source=CGLA;Tru sted_Connection =yes")
Dim MyCommand As New System.Data.Sql Client.SqlComma nd("select * from Authors", MyConnection) MyConnection.Op en() Dim dr As System.Data.Sql Client.SqlDataR eader = MyCommand.Execu teReader() MyDataGrid.Data Source = dr
MyDataGrid.Data Bind() MyConnection.Cl ose() End Sub </script>
'______________ _______________ _______________ _______________ _________-
<HTML> <body>
<h3><font face="Verdana"> Simple Select to a DataGrid Control</font></h3>
<ASP:DataGrid id="MyDataGrid " runat="server" Width="700" BackColor="#ccc cff" BorderColor="bl ack" ShowFooter="fal se" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaa add" EnableViewState ="false" />
</body> </HTML>
_______________ _______________ _______________ _______________
"Kevin Spencer" wrote:
I have a Ferrari. I took the engine out of my Volkswagon and put it in the Ferrari. Now the Ferrari doesn't run. Why doesn't my Ferrari run with a Volkswagon engine?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be.
"leonat" <le****@discuss ions.microsoft. com> wrote in message news:D4******** *************** ***********@mic rosoft.com... >I have an asp.net webform. When I view the page in the web browser, the >html > is returned but not any asp code, i.e., " <% ... %> ". > > This same code works in the "old" asp page BUT NOT in asp.net. > > > See code below: > > _______________ _______________ _______________ _______________ _____- > > <form action="intro2. aspx" method="post"> > <h3>Name: <input id="Name" type="text"> Category: > > <select id="Category" size="1"> > <option>psychol ogy</option> > <option>busines s</option> > <option>popular _comp</option> > </select> > > </h3><input type="submit" value="Lookup"> > <p> > > <% Dim I As Integer > For I = 0 to 7 %> > <font size="<%=I%>">W elcome to ASP.NET </font> > <br> > <% Next %> > > </form> > > _______________ _______________ _______________ _______________ _ > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: gmesmer |
last post by:
Hello
I have created an assembly to print a pdf document and I wrote some unit tests and everything works from within nuint and cruisecontrol.net. ( I am using C#)
Next I have to put together a Windows Service, which checks in a specific directory for pdf files and prints them automatically. I hoped to reuse my assembly, however when I use it within the windows service, nothing happens, it does not print. I even don't get an exception. Does...
|
by: Paul Cochrane |
last post by:
Hi all,
I've got an application that I'm writing that autogenerates python code
which I then execute with exec(). I know that this is not the best way to
run things, and I'm not 100% sure as to what I really should do. I've had a
look through Programming Python and the Python Cookbook, which have given me
ideas, but nothing has gelled yet, so I thought I'd put the question to the
community. But first, let me be a little more detailed...
|
by: Bryan |
last post by:
I have a multi-threaded C# console application that uses WMI
(System.Management namespace) to make RPC calls to several servers (600+ )
and returns ScheduledJobs. The section of my code that performs the query
is contained in a delegate function that I execute via a second thread. On 1
or 2 of the 600+ servers the query hangs. I've tried to use Thread.Join()
coupled with a Thread.Abort() but this does not kill the thread.
Based on...
|
by: Guadala Harry |
last post by:
I have some logic that currently processes values retrieved by looping
through a HashTable/ListDictionary structure (a hash table that contains
ListDictionary objects as its values). Logically it's just a bunch of rows
and columns - just like in a DataTable or row set returned by a DataReader.
You can visualize this as 3 columns and N rows.
I need for the same logic to be able to process identical data - but by
processing DataRows of an...
|
by: Tony |
last post by:
I am running an application called AcroComm.exe to poll time clocks here at
our company. I have written a small C# app that will poll the clocks based
on information found in a DB. My problem is that AcroComm will sometimes
stop polling in the middle of the process and terminate. The programing
manual for the app says that it sends a code to the operating system when it
is done that tells what has happend like the following:
0 ...
| |
by: Praveen K |
last post by:
I have a problem in communicating between the C# and the Excel Interop
objects. The problem is something as described below.
I use Microsoft Office-XP PIA dll’s as these dll’s were been recommended by
many for web applications. I create the instances of Excel, Workbook and the
worksheet. And later on Release the references by
“System.Runtime.InteropServices.Marshal.ReleaseComObject(Object)” and making
the object as null finally....
|
by: Joe Fallon |
last post by:
I have some complex logic which is fairly simply to build up into a string.
I needed a way to Eval this string and return a Boolean result.
This code works fine to achieve that goal.
My question is what happens to the dynamically created assembly when the
method is done running? Does GC take care of it?
Or is it stuck in RAM until the ASP.Net process is recycled?
This code executes pretty frequently (maybe 4 times per transaction) and...
|
by: tshad |
last post by:
I am just trying to decide whether to split my code and uses code behind. I
did it with one of my pages and found it was quite a bit of trouble.
I know that most people (and books and articles) like it because you can
split the code from the design. That is logical. But if you are the only
one working on the code, it seem a little overkill.
I use Dreamweaver to do my design and find it a bit of a hassle to have
multiple files open...
|
by: jbenezech |
last post by:
Hi All,
I have a perl script which starts a java process using Win32::Process. Here is the code to start the java proces:
Win32::Process::Create($ProcessObj,
shift(@args),
join(" ", @args),
0,
Win32::Process::NORMAL_PRIORITY_CLASS|Win32::Process::CREATE_NO_WINDOW|Win32::Process::DETACHED_PROCESS,
$installPath) or $retCode = 99;
|
by: David |
last post by:
Hi list.
Do test-driven development or behaviour-driven development advocate
how to do higher-level testing than unit testing?
types of testing:
unit
integration
system
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |