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>psychology</option>
<option>business</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%>">Welcome to ASP.NET </font>
<br>
<% Next %>
</form>
__________________________________________________ ___________ 6 1382
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****@discussions.microsoft.com> wrote in message
news:D4**********************************@microsof t.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>psychology</option> <option>business</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%>">Welcome 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****@discussions.microsoft.com> wrote in message news:D4**********************************@microsof t.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>psychology</option> <option>business</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%>">Welcome 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="WebForm5.aspx.vb"
Inherits="WebApplicationLPM.WebForm5"%>
<script language="VB" runat="server">
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
Dim MyConnection As New
System.Data.SqlClient.SqlConnection("Provider=SQLO LEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=pubs;Data
Source=CGLA;Trusted_Connection=yes")
Dim MyCommand As New System.Data.SqlClient.SqlCommand("select * from
Authors", MyConnection)
MyConnection.Open()
Dim dr As System.Data.SqlClient.SqlDataReader =
MyCommand.ExecuteReader()
MyDataGrid.DataSource = dr
MyDataGrid.DataBind()
MyConnection.Close()
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="#ccccff" BorderColor="black" ShowFooter="false" CellPadding="3"
CellSpacing="0" Font-Name="Verdana" Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd" 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="WebForm5.aspx.vb"
Inherits="WebApplicationLPM.WebForm5"%>
<script language="VB" runat="server">
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
Dim MyConnection As New
System.Data.SqlClient.SqlConnection("Provider=SQLO LEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=pubs;Data
Source=CGLA;Trusted_Connection=yes")
Dim MyCommand As New System.Data.SqlClient.SqlCommand("select * from
Authors", MyConnection)
MyConnection.Open()
Dim dr As System.Data.SqlClient.SqlDataReader =
MyCommand.ExecuteReader()
MyDataGrid.DataSource = dr
MyDataGrid.DataBind()
MyConnection.Close()
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="#ccccff" BorderColor="black" ShowFooter="false" CellPadding="3"
CellSpacing="0" Font-Name="Verdana" Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd" 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****@discussions.microsoft.com> wrote in message news:D4**********************************@microsof t.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>psychology</option> <option>business</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%>">Welcome 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****@discussions.microsoft.com> wrote in message
news:9C**********************************@microsof t.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****@discussions.microsoft.com> wrote in message news:D4**********************************@microsof t.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>psychology</option> > <option>business</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%>">Welcome 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="WebForm5.aspx.vb" Inherits="WebApplicationLPM.WebForm5"%> <script language="VB" runat="server"> 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 Dim MyConnection As New System.Data.SqlClient.SqlConnection("Provider=SQLO LEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=pubs;Data Source=CGLA;Trusted_Connection=yes")
Dim MyCommand As New System.Data.SqlClient.SqlCommand("select * from Authors", MyConnection) MyConnection.Open() Dim dr As System.Data.SqlClient.SqlDataReader = MyCommand.ExecuteReader() MyDataGrid.DataSource = dr
MyDataGrid.DataBind() MyConnection.Close() 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="#ccccff" BorderColor="black" ShowFooter="false" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" 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****@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com... This asp.net CODE does not work either. Only the HTML code is returned.
See Code below
__________________________________________________ ___________
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm5.aspx.vb" Inherits="WebApplicationLPM.WebForm5"%> <script language="VB" runat="server"> 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 Dim MyConnection As New System.Data.SqlClient.SqlConnection("Provider=SQLO LEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=pubs;Data Source=CGLA;Trusted_Connection=yes")
Dim MyCommand As New System.Data.SqlClient.SqlCommand("select * from Authors", MyConnection) MyConnection.Open() Dim dr As System.Data.SqlClient.SqlDataReader = MyCommand.ExecuteReader() MyDataGrid.DataSource = dr
MyDataGrid.DataBind() MyConnection.Close() 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="#ccccff" BorderColor="black" ShowFooter="false" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" 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****@discussions.microsoft.com> wrote in message news:D4**********************************@microsof t.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>psychology</option> > <option>business</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%>">Welcome to ASP.NET </font> > <br> > <% Next %> > > </form> > > __________________________________________________ ___________ > >
I got it to work.
I registered the aspnet_regiis.exe -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****@discussions.microsoft.com> wrote in message news:62**********************************@microsof t.com... This asp.net CODE does not work either. Only the HTML code is returned.
See Code below
__________________________________________________ ___________
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm5.aspx.vb" Inherits="WebApplicationLPM.WebForm5"%> <script language="VB" runat="server"> 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 Dim MyConnection As New System.Data.SqlClient.SqlConnection("Provider=SQLO LEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=pubs;Data Source=CGLA;Trusted_Connection=yes")
Dim MyCommand As New System.Data.SqlClient.SqlCommand("select * from Authors", MyConnection) MyConnection.Open() Dim dr As System.Data.SqlClient.SqlDataReader = MyCommand.ExecuteReader() MyDataGrid.DataSource = dr
MyDataGrid.DataBind() MyConnection.Close() 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="#ccccff" BorderColor="black" ShowFooter="false" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" 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****@discussions.microsoft.com> wrote in message news:D4**********************************@microsof t.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>psychology</option> > <option>business</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%>">Welcome 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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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)...
|
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,
...
|
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: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |