未能在"设计"视图中打开.在"<% ..."值"..%>"块中,以不同方式将值括起来!
用dreamweaver设计的页面拿到VS.NET 2003 中就出现这样的作物~
<%@ Page Language= "C# " ContentType= "text/html " ResponseEncoding= "gb2312 " %>
<%@ Register TagPrefix= "MM " Namespace= "DreamweaverCtrls " Assembly= "DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral " %>
<MM:DataSet
id= "ZpData "
runat= "Server "
IsStoredProcedure= "false "
ConnectionString= ' <%# System.Configuration.ConfigurationSettings.AppSettings[ "MM_CONNECTION_STRING_information "] %> '
DatabaseType= ' <%# System.Configuration.ConfigurationSettings.AppSettings[ "MM_CONNECTION_DATABASETYPE_information "] %> '
CommandText= ' <%# "SELECT zp_ID, zp_name, zp_lb, zp_jx, zp_sjdw, zp_sjry FROM dbo.Zp_infor ORDER BY zp_name ASC " %> '
Debug= "true " PageSize= "4 " CurrentPage= ' <%# ((Request.QueryString[ "ZpData_CurrentPage "] != null) && (Request.QueryString[ "ZpData_CurrentPage "].Length > 0)) ? Int32.Parse(Request.QueryString[ "ZpData_CurrentPage "]) : 0 %> '
> </MM:DataSet>
<MM:PageBind runat= "server " PostBackBind= "true " />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 无标题文档 </title>
<style type= "text/css ">
<!--
.STYLE3 {
font-size: xx-large;
font-weight: bold;
}
-->
</style>
<script type= "text/JavaScript ">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<table width= "600 " height= "320 " border= "0 " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td> <span class= "STYLE3 "> 设计作品展示: </span> </td>
</tr>
<tr>
<td height= "174 "> <form runat= "server ">
<asp:DataList id= "ZpDataList "
runat= "server "
RepeatColumns= "1 "
RepeatDirection= "Vertical "
RepeatLayout= "Table "
DataSource= ' <%# ZpData.DefaultView %> ' >
<ItemTemplate>
<table width= "100% " height= "175 " border= "0 " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td width= "34% " rowspan= "5 "> <img src= ' "../Admin/勘察设计协会/File/UpFiles/设计作品/ "+ <%# ZpData.FieldValue( "zp_ID ", Container) %> + ".jpg " ' alt= " " width= "250 " height= "175 " onclick= "MM_openBrWindow( 'Sjzp_xq.aspx?zp_ID= <%# ZpData.FieldValue( "zp_ID ", Container) %> ', ' ', ' ') " /> </td>
<td width= "66% " height= "35 "> <%# ZpData.FieldValue( "zp_name ", Container) %> </td>
</tr>
<tr>
<td height= "35 "> <%# ZpData.FieldValue( "zp_lb ", Container) %> </td>
</tr>
<tr>
<td height= "35 "> <%# ZpData.FieldValue( "zp_jx ", Container) %> </td>
</tr>
<tr>
<td height= "35 "> <%# ZpData.FieldValue( "zp_sjdw ", Container) %> </td>
</tr>
<tr>
<td height= "35 "> <%# ZpData.FieldValue( "zp_sjry ", Container) %> </td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
<table border= "0 " width= "50% " align= "center ">
<tr>
<td width= "23% " align= "center "> <MM:If runat= "server " Expression= ' <%# (ZpData.CurrentPage != 0) %> '>
<ContentsTemplate> <a href= ' <%# Request.ServerVariables[ "SCRIPT_NAME "] %> ?ZpData_currentPage=0 '> 第一页 </a> </ContentsTemplate>
</MM:If>
</td>
<td width= "31% " align= "center "> <MM:If runat= "server " Expression= ' <%# (ZpData.CurrentPage != 0) %> '>
<ContentsTemplate> <a href= ' <%# Request.ServerVariables[ "SCRIPT_NAME "] %> ?ZpData_currentPage= <%# Math.Max(ZpData.CurrentPage - 1, 0) %> '> 前一页 </a> </ContentsTemplate>
</MM:If>
</td>
<td width= "23% " align= "center "> <MM:If runat= "server " Expression= ' <%# (ZpData.CurrentPage < ZpData.LastPage) %> '>
<ContentsTemplate> <a href= ' <%# Request.ServerVariables[ "SCRIPT_NAME "] %> ?ZpData_currentPage= <%# Math.Min(ZpData.CurrentPage + 1, ZpData.LastPage) %> '> 下一页 </a> </ContentsTemplate>
</MM:If>
</td>
<td width= "23% " align= "center "> <MM:If runat= "server " Expression= ' <%# (ZpData.CurrentPage < ZpData.LastPage) %> '>
<ContentsTemplate> <a href= ' <%# Request.ServerVariables[ "SCRIPT_NAME "] %> ?ZpData_currentPage= <%# ZpData.LastPage %> '> 最后一页 </a> </ContentsTemplate>
</MM:If>
</td>
</tr>
</table>
</form> </td>
</tr>
<tr>
<td height= "26 "> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
[解决办法]
这是有不符合W3C标准的存在
不影响你的,设计时在DW里边设计行了
[解决办法]
', "的问题,成对出现就可以
------解决方案--------------------
顶 楼上的
[解决办法]
检查下语法配对的问题,应该就可以了。
[解决办法]
也遇到过这样的,一般都是单引号的问题,成对出现,不过没有研究过到底怎么回事,因为有时候也不是单引号的问题
[解决办法]
2003里不好检查..2005里它提示了地区的地方
[解决办法]
链接的写法:
<a href= 'ApplyJob.aspx?PlaceID= <%# DataBinder.Eval(Container.DataItem, "PlaceID ").ToString()%> '>
字符常量的写法:
<a href= ' <%# "# "+DataBinder.Eval(Container.DataItem, "PlaceID ").ToString() %> ' title= ' <%# DataBinder.Eval(Container.DataItem, "OtherRequire ").ToString()%> '>
<%# (Container.ItemIndex+1).ToString()+ "· "+DataBinder.Eval(Container.DataItem, "EmployPlace ").ToString() %>
绑定写法
<ItemTemplate>
<tr height= "28 ">
<td align= "right " width= "100 " bgcolor= "#E5FBF1 "> <a name= ' <%# DataBinder.Eval(Container.DataItem, "PlaceID ").ToString()%> '> 职位: </td>
<td width= "480 " bgcolor= "#E5FBF1 "> <span class= "style2 "> <strong> <%# DataBinder.Eval(Container.DataItem, "EmployPlace ").ToString() %> </strong> </span> </td>
</tr>
<tr>
<td vAlign= "top " align= "right " bgColor= "#F0FAFF "> 职位描述: </td>
<td vAlign= "top " bgColor= "#F0FAFF "> <%# DataBinder.Eval(Container.DataItem, "OtherRequire ").ToString() %>
</td>
</tr>
<tr>
<td align= "right "> 招聘的类型: </td>
<td> <%# DataBinder.Eval(Container.DataItem, "ProvideHousing ").ToString() %> </td>
</tr>
<tr>
<td align= "right " bgColor= "#F0FAFF "> 招聘人数: </td>
<td bgColor= "#F0FAFF "> <%# DataBinder.Eval(Container.DataItem, "EmployNumber ").ToString() %> </td>
</tr>
<tr>
<td align= "right "> 有效期至 </td>
<td> <%# DataBinder.Eval(Container.DataItem, "PeriodOfValidity ").ToString() %> </td>
</tr>
<tr>
<td align= "right " bgColor= "#F0FAFF "> 薪资待遇: </td>
<td bgColor= "#F0FAFF "> <%# DataBinder.Eval(Container.DataItem, "CompensationDeal ").ToString() %> </td>
</tr>
<tr>
<td align= "right "> 工作地: </td>
<td> <%# DataBinder.Eval(Container.DataItem, "JobLocus ").ToString() %> </td>
</tr>
<tr>
<td vAlign= "top " align= "right " bgColor= "#F0FAFF "> 年龄要求: </td>
<td bgColor= "#F0FAFF "> <%# DataBinder.Eval(Container.DataItem, "AgeRequire ").ToString() %> </td>
</tr>
<tr>
<td vAlign= "top " align= "right "> 性别要求: </td>
<td> <%# DataBinder.Eval(Container.DataItem, "SexRequire ").ToString() %> </td>
</tr>
<tr align= "center ">
<td height= "18 " colspan= "2 " bgColor= "#F0FAFF "> <a href= 'ApplyJob.aspx?PlaceID= <%# DataBinder.Eval(Container.DataItem, "PlaceID ").ToString()%> '> <span style= "font-weight: bold "> <font style= "font-size:14px "> <img src= "../images/sqjob.gif " width= "100 " height= "23 " border= "0 "> </font> </span> </a> </td>
</tr>
<tr align=right>
<td colspan= "2 " align= "right " valign= "top " background= "../images/line3.gif " height= "17 "> <img src= "../images/totop.gif " width= "21 " height= "19 "> <A HREF= "#top "> <span style= "font-weight: bold "> <font style= "font-size:14px "> Top </font> </span> </td>
</tr>
</ItemTemplate>
[解决办法]
<%# %> 应该被包括在 ' '之间
比如
onclick= "window.open( "webForm1.aspx?userId= <%# DataBinder.Eval(Container.DataItem, "PlaceID ")%> ", " ", " "); "
这样是不行的.就会提示
未能在"设计"视图中打开.在" <% ... "值 "..%> "块中,以不同方式将值括起来!
正确的写法应该是
onclick= 'window.open( "webForm1.aspx?userId= <%# DataBinder.Eval(Container.DataItem, "PlaceID ")%> ", " ", " "); '