各位大牛,今天遇到个问题,很头痛。
先看代码:
b.ascx
<!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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:b ID="b1" runat="server">
<SearchingItemsssss></SearchingItemsssss>
</uc1:b>
</div>
</form>
</body>
</html>b.ascx.csnamespace WebApplication3
{
public partial class b : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{ } [DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
NotifyParentProperty(true), MergableProperty(false), DefaultValue((string)null),
Editor(@"System.Web.UI.Design.WebControls.ListItemsCollectionEditor,
System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerProperty)]
public ListItemCollection SearchingItemsssss
{
set
{
}
get
{
return new ListItemCollection();
}
} }
}
default.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication3._Default" %><%@ Register Src="b.ascx" TagName="b" TagPrefix="uc1" %>
<!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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:b ID="b1" runat="server">
<SearchingItemsssss>
</SearchingItemsssss>
</uc1:b>
</div>
</form>
</body>
</html>无其余代码
但default.aspx页面在从“源”切换到“拆分”或“设计”时,就会提示“类型“System.Web.UI.UserControl”不具有名为“SearchingItemsssss”的公共属性”
请问改如何弄啊,很急啊。
先看代码:
b.ascx
<!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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:b ID="b1" runat="server">
<SearchingItemsssss></SearchingItemsssss>
</uc1:b>
</div>
</form>
</body>
</html>b.ascx.csnamespace WebApplication3
{
public partial class b : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{ } [DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
NotifyParentProperty(true), MergableProperty(false), DefaultValue((string)null),
Editor(@"System.Web.UI.Design.WebControls.ListItemsCollectionEditor,
System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerProperty)]
public ListItemCollection SearchingItemsssss
{
set
{
}
get
{
return new ListItemCollection();
}
} }
}
default.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication3._Default" %><%@ Register Src="b.ascx" TagName="b" TagPrefix="uc1" %>
<!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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:b ID="b1" runat="server">
<SearchingItemsssss>
</SearchingItemsssss>
</uc1:b>
</div>
</form>
</body>
</html>无其余代码
但default.aspx页面在从“源”切换到“拆分”或“设计”时,就会提示“类型“System.Web.UI.UserControl”不具有名为“SearchingItemsssss”的公共属性”
请问改如何弄啊,很急啊。
解决方案 »
- 急~ 下面这段代码放在什么地方啊 我放在.aspx.cs页面里 运行时候说无法确定url格式
- 怎么通过ajax处理页面统一表格的数据源List<Object>
- 在线等SuperAuthenticationCode验证证控件在iis中不显示验证码问题
- SQL语句建表的问题
- 对ASP.net的书很是失望啊?
- 请问:为什么直接能够访问的aspx文件和dll文件,在vs里面编译出错?
- 怎样把datagrid的框架固定住,数据多时不会被撑得很大
- 新手报到,送分!
- 一个问题:)
- xml 文档转换器是个什么东东,谁能说说???有一难题,请大家帮忙看看,具体内容见内:
- 救急救急啊:还是2010水晶报表
- 从页面A在同一个窗口打开页面B,然后再回到A。再从A打开B页面的时候
NotifyParentProperty(true), MergableProperty(false), DefaultValue((string)null),
Editor(@"System.Web.UI.Design.WebControls.ListItemsCollectionEditor,
System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerProperty)] 加上 试试