首页上一页 1  下一页尾页 2 条记录 1/1页
        ASP.NET 2.0网络编程自学手册 2.1.6示例一运行就报错
                 	
                        发表在ASP.NET图书答疑
                        2008-03-09                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           <P>按照书上写的打,还是报错,我是新手,一点基础也没有,高手帮忙解答一下,谢谢!</P>
<P>报错提示:</P>
<P><SPAN> </P>
<H1>“/”应用程序中的服务器错误。
<HR width="100%" color=silver SIZE=1>
</H1>
<H2><I>分析器错误</I> </H2>
<P></SPAN><FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><B>说明: </B>在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 <BR><BR><B>分析器错误消息: </B>由于先前已在此页中指定了另一种语言(或者由 CodeFile 属性暗示),因此无法使用“javascript”。<BR><BR><B>源错误:</B> <BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE><PRE>行 6: <head runat="server">
行 7: <title>HTML服务器控件</title>
<FONT color=red>行 8: <script language="javascript" type="text/javascript" runat="server">
</FONT>行 9: function btnRed_onclick()
行 10: {</PRE></CODE></TD></TR></TBODY></TABLE><BR><B><FONT face=Verdana>源文件: </FONT></B>/Default.aspx<B><FONT face=Verdana>    行: </FONT></B>8 <BR><BR></P>
<HR width="100%" color=silver SIZE=1>
<P><B><FONT face=Verdana>版本信息:</FONT></B> Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433 </P>
<P>我在studio 2.8中输入的内容:</P>
<P><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HTMLtest1._Default" %></P>
<P><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</A>"></P>
<P><html xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>" ><BR><head runat="server"><BR>    <title>HTML服务器控件</title><BR>    <script language="javascript" type="text/javascript" runat="server"><BR>        function btnRed_onclick()<BR>        {<BR>            form1.Style.backgroundcolor = "red"; <BR>        }<BR>    </script><BR></head><BR><body><BR>    <form id="form1" runat="server"><BR>    <BR>       <input id="btnRed" type="button" value="Red"  onclick="return btnRed_onclick()" /><BR>    <BR>    </form><BR></body><BR></html><BR></P>
<P>而且我的IIS里没有WEB扩展服务这一项,我安装时选的是默认安装</FONT></P>
                
        	
        
        
    <P>报错提示:</P>
<P><SPAN> </P>
<H1>“/”应用程序中的服务器错误。
<HR width="100%" color=silver SIZE=1>
</H1>
<H2><I>分析器错误</I> </H2>
<P></SPAN><FONT face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><B>说明: </B>在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 <BR><BR><B>分析器错误消息: </B>由于先前已在此页中指定了另一种语言(或者由 CodeFile 属性暗示),因此无法使用“javascript”。<BR><BR><B>源错误:</B> <BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE><PRE>行 6: <head runat="server">
行 7: <title>HTML服务器控件</title>
<FONT color=red>行 8: <script language="javascript" type="text/javascript" runat="server">
</FONT>行 9: function btnRed_onclick()
行 10: {</PRE></CODE></TD></TR></TBODY></TABLE><BR><B><FONT face=Verdana>源文件: </FONT></B>/Default.aspx<B><FONT face=Verdana>    行: </FONT></B>8 <BR><BR></P>
<HR width="100%" color=silver SIZE=1>
<P><B><FONT face=Verdana>版本信息:</FONT></B> Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433 </P>
<P>我在studio 2.8中输入的内容:</P>
<P><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HTMLtest1._Default" %></P>
<P><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</A>"></P>
<P><html xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>" ><BR><head runat="server"><BR>    <title>HTML服务器控件</title><BR>    <script language="javascript" type="text/javascript" runat="server"><BR>        function btnRed_onclick()<BR>        {<BR>            form1.Style.backgroundcolor = "red"; <BR>        }<BR>    </script><BR></head><BR><body><BR>    <form id="form1" runat="server"><BR>    <BR>       <input id="btnRed" type="button" value="Red"  onclick="return btnRed_onclick()" /><BR>    <BR>    </form><BR></body><BR></html><BR></P>
<P>而且我的IIS里没有WEB扩展服务这一项,我安装时选的是默认安装</FONT></P>

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
                







 
                     
                     
					 
						 
						 
						 
						