C#的OA框架出错,请高手指教
源码:using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.BLL;
using COM.OA.Entity;
public partial class tzManager_addtz : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//从Session中取得信息
users user = Session["loginuser"] as users;
//判断信息 如果为空跳回登陆页面
if (user == null)
{
this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
return;
}
if (!IsPostBack)
{
this.txtTitle.Focus();
}
}
protected void btnfabu_Click(object sender, EventArgs e)
{
users user = Session["loginuser"] as users;
//用户id
int u_id = Int32.Parse(user.u_id.ToString());
//部门ID
int dept_id = user.u_dept_id;
//标题
string title = this.txtTitle.Text;
//内容
string content = this.ftbContent.Text;
//状态
int state = 0;
//阅读次数
int reads = 0;
//time
DateTime time = DateTime.Parse(DateTime.Now.ToString());
if (title !="")
{
if ( content != "")
{
sendword sw = new sendword();
sw.sw_u_id = u_id;
sw.sw_dept_id = dept_id;
sw.sw_title = title;
sw.sw_content = content;
sw.sw_state = state;
sw.sw_reads = reads;
sw.sw_releasetime = time;
int i = sendwordBLL.Insert(sw);
if (i < 0)
{
this.Response.Redirect("sendwordindex.aspx");
}
}
else
{
this.Response.Write("<script>window.alert ('请您输入内容')</script>");
this.ftbContent.Focus = true;
}
}
else
{
this.Response.Write("<script>window.alert ('请您输入标题')</script>");
this.txtTitle.Focus();
}
}
protected void btnselect_Click(object sender, EventArgs e)
{
//从页面取值
string tiaojian = this.txtwhere.Text;
//放入session
Session.Add("tiaojian", tiaojian);
//跳转到查询页面
this.Response.Write(string.Format(GetRedirect.REDIRECT, "mohuchaxun.aspx"));
}
protected void btnquxiao_Click(object sender, EventArgs e)
{
//清空文档框,标题栏获得焦点
this.txtTitle.Text = "";
this.ftbContent.Text = "";
this.txtTitle.Focus();
}
}
错误 1 “tzManager_addtz”不包含“ftbContent”的定义,并且找不到可接受类型为“tzManager_addtz”的第一个参数的扩展方法“ftbContent”(是否缺少 using 指令或程序集引用?) 。。。。\oaPro\tzManager\addtz.aspx.cs 42 31
不知道为什么,请高数指教 --------------------编程问答-------------------- 请把定义ftbContent这个控件的代码段贴出来 --------------------编程问答-------------------- 应该是没找到ftbContent
--------------------编程问答-------------------- webconfig 中定义
<appSettings>
<add key="DAL" value="COM.OA.SqlServerDAL"/>
<add key="Entity" value="COM.OA.Entity"/>
</appSettings> --------------------编程问答-------------------- 定义控件的代码
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<!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>
<style type="text/css">
<!--
body {
margin-top: 2px;
}
-->
div.RoundedCorner{background: #5AAE18}
b.rtop, b.rbottom{display:block;background: #FFF}
b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #5AAE18}
b.r1{margin: 0 4px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.rtop b.r4, {margin: 0 1px;height: 1px}
.style1 {
font-size: 13px;
color: #FFFFFF;
font-weight: bold;
}
</style>
<title>修改通知</title>
<link href="../css/link.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form action="" runat="server" method="post" name="form1" id="form1" onsubmit="return dis()" >
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="33%" valign="middle"> </td>
<td width="47%" valign="middle"><div align="right">
<asp:TextBox ID="txtwhere" runat="server"></asp:TextBox>
<asp:Button ID="btnselect" runat="server" OnClick="btnselect_Click" Text="查 询" />
</div></td>
<td width="3%"><div align="center">
<img src="../images/huiyan/jieshoutongzhi.gif" /></div></td>
<td width="7%"><span class="style4"><a href="" class="style4">接收通知</a></span></td>
<td width="2%"><span class="style4">
<img src="../images/huiyan/tongzhiguanli.gif" /></span></td>
<td width="7%"><div align="center" class="style4"><a href="">通知管理</a> </div></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="RoundedCorner">
<b class="rtop"><b class="r1"></b><b class="r2"></b>
<b class="r3"></b><b class="r4"></b></b> <span class="style1">修 改 通 知</span></div>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
<tr>
<td height="250" bgcolor="#FFFFFF">
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td colspan="2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" style="height: 11px"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="90" style="height: 25px"> 标 题:</td>
<td width="660" bgcolor="#FFFFFF" style="height: 25px; text-align: left">
<asp:TextBox ID="txtTitle" runat="server" Width="75%" Wrap="False"></asp:TextBox></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="left" style="text-align: center"><br/>
<table width="11" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 71px; height: 36px"> 内 容:</td>
</tr>
<tr>
<td style="width: 71px">
<img src="../images/huiyan/neirong.gif" /></td>
</tr>
</table>
</div></td>
<td bgcolor="#FFFFFF" style="text-align: left">
<ftb:freetextbox id="ftbContent" runat="server"></ftb:freetextbox>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" style="height: 14px; text-align: left;">
<asp:TextBox ID="txtsw_id" runat="server" Visible="False"></asp:TextBox>
<asp:TextBox ID="txtsw_dept_id" runat="server" Visible="False"></asp:TextBox>
<asp:TextBox ID="txtuid" runat="server" Visible="False"></asp:TextBox>
<asp:TextBox ID="txtreads" runat="server" Visible="False"></asp:TextBox>
<asp:TextBox ID="txtstate" runat="server" Visible="False"></asp:TextBox></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="8" colspan="2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" style="height: 4px"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td style="height: 28px">
</td>
<td bgcolor="#FFFFFF" style="text-align: left; height: 28px;">
<asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click"
Text="修 改" />
<asp:Button ID="btnQuxiao" runat="server" Text="取 消" OnClick="btnQuxiao_Click" /></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
--------------------编程问答-------------------- 错误 1 意外的字符序列。 应输入样式规则的选择器。 。。。。\oaPro\tzManager\updaz.aspx 12 5 。。。。root\oaPro\
--------------------编程问答-------------------- 很可能是你没在项目的bin文件夹中引用<ftb:freetextbox id="ftbContent" runat="server"></ftb:freetextbox>所属的组件 --------------------编程问答-------------------- <ftb:freetextbox id="ftbContent" runat="server"></ftb:freetextbox>
--------------------编程问答--------------------
能说的详细一点吗 --------------------编程问答-------------------- 这个控件是封装在FreetextBox.dll这个外部组件里的,那么,你下面要做的就是:
1) 把FTBv3-1-1\Framework-1.1\FreetextBox.dll拷入bin目录.
2) 在项目中添加FreetextBox.dll的dll引用
3) Web.config加入如下代码
1<?xml version="1.0" encoding="utf-8" ?>--------------------编程问答--------------------
2 <configuration>
3 <system.web>
4 <httpHandlers>
5 <add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
6 </httpHandlers>
7 <system.web>
8 <configuration>
非常感谢,我马上试一试!
--------------------编程问答-------------------- 查了,运行时提示如下错误
错误 1 加载配置文件时出错: 由于已经达到网络 BIOS 命令限制,因此未能开始监视对“\\.....\wwwroot\oaPro\freetextbox\ftbv3-1-6\examples\custom_ddl_values”的更改。有关此错误的详细信息,请参见 Microsoft 知识库文章 810886。Windows XP 平台不支持在 UNC 共享上承载。 \\.........\wwwroot\oaPro\freetextbox\ftbv3-1-6\examples\custom_ddl_values\web.config
补充:.NET技术 , C#