G
Guest
I've been using my installed VS 2005 for several months with no problem.
Suddenly, something strange is happeneing and I'm not sure if it's something
I'm missing in ASP.NET or something that's gotten messed up in VS.
If I create a completely new Web Site Project in a blank directory with
nothing in it, VS automatically creates a single Default.aspx with a
code-behind page. If I go in and edite the Code-Behind and insert something
like a Response.Write(), all goes well.
But if I try to create a new ASPX file and I uncheck the "Place code in a
separate file" checkbox, and then I try to place that same Response.Write()
in a server-side script block in the actual ASPX file, I get weird parsing
errors and t=the pop-down intellisense feature doesn't even show the Response
object as being available in scope. How is this possible? What's wrong with
my extremely simple stand-alone ASPX file?
Below is the full text of this extremely short file and would love it if
someone could tell me what could possibly be wrong with it! I've even
manually placed a bunch of <%@ Import Namespace=...%> things in there but
that doesn't seem to fix the problem!
Default.aspx...
--------------------------------------------------
<%@ Page Language="C#" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Import Namespace="System.Web.UI.WebControls.WebParts" %>
<%@ Import Namespace="System.Web.UI.HtmlControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language="C#" runat="server">
Response.Write("???");
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
--------------------------------------------------
Suddenly, something strange is happeneing and I'm not sure if it's something
I'm missing in ASP.NET or something that's gotten messed up in VS.
If I create a completely new Web Site Project in a blank directory with
nothing in it, VS automatically creates a single Default.aspx with a
code-behind page. If I go in and edite the Code-Behind and insert something
like a Response.Write(), all goes well.
But if I try to create a new ASPX file and I uncheck the "Place code in a
separate file" checkbox, and then I try to place that same Response.Write()
in a server-side script block in the actual ASPX file, I get weird parsing
errors and t=the pop-down intellisense feature doesn't even show the Response
object as being available in scope. How is this possible? What's wrong with
my extremely simple stand-alone ASPX file?
Below is the full text of this extremely short file and would love it if
someone could tell me what could possibly be wrong with it! I've even
manually placed a bunch of <%@ Import Namespace=...%> things in there but
that doesn't seem to fix the problem!
Default.aspx...
--------------------------------------------------
<%@ Page Language="C#" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Import Namespace="System.Web.UI.WebControls.WebParts" %>
<%@ Import Namespace="System.Web.UI.HtmlControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language="C#" runat="server">
Response.Write("???");
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
--------------------------------------------------