项目运行问题。错误 248 “YiWangDian.Web.Admin.Ascx.AddSearch”并不包含“Context”的定义 c:\WINDOWS\M
错误 248 “YiWangDian.Web.Admin.Ascx.AddSearch”并不包含“Context”的定义 c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web.csproj\65deb15e\1e9392aa\App_Web_gequbzlx.6.cs 81 1 YiWangDian.Web哪位大侠帮忙来看看啊。。小弟真的不知道怎么解决。。。可以的留个联系方式。。QQ什么的。。谢谢。。。 --------------------编程问答-------------------- namespace JiSuShop.Web.Admin.Ascx
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using JiSuShop.Components;
using JiSuShop.Components.Business;
using JiSuShop.Components.Utility;
using JiSuShop.Components.WebBase;
/// <summary>
/// AddSearch 的摘要说明。
/// </summary>
public partial class AddSearch : JiSuControl
{
protected System.Web.UI.WebControls.Button buttonOK;
protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
protected System.Web.UI.WebControls.TextBox txtResearchName;
protected System.Web.UI.WebControls.TextBox txtResearchDescrip;
protected System.Web.UI.WebControls.RequiredFieldValidator Requiredfieldvalidator2;
protected System.Web.UI.WebControls.CheckBox isShow;
protected System.Web.UI.HtmlControls.HtmlForm Form1;
protected System.Web.UI.WebControls.RadioButton danxuan;
protected System.Web.UI.WebControls.RadioButton fuxuan;
private Research rs;
private void Page_Load(object sender, EventArgs e)
{
// 在此处放置用户代码以初始化页面
InitRS();
if (!IsPostBack)
{
InitAttribute();
}
}
private void InitRS()
{
int id = (int) Sit.GetID(Request.QueryString["id"]);
if (id == 0)
{
rs = new Research();
}
else
{
rs = new Research(id);
if (Request.QueryString["dt"] == "1")
{
rs.Delete();
Back();
}
buttonOK.Text = "更新";
}
}
private void Back()
{
Response.Redirect("Research.aspx");
}
private void InitAttribute()
{
// if (rs.ID == 1)
// {
// txtResearchName.Enabled = false;
// }
txtResearchName.Text = rs.Name;
txtResearchDescrip.Text = rs.Content;
if(rs.IsShow == true)
{
isShow.Checked = true;
}
else
{
isShow.Checked = true;
}
if(rs.Type == 0)
{
danxuan.Checked = true;//Type 为0是单选,1为复选
fuxuan.Checked = false;
}
else
{
fuxuan.Checked = true;
danxuan.Checked = false;
}
}
#region Web 窗体设计器生成的代码
protected override void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void buttonOK_Click(object sender, EventArgs e)
{
rs.Name = txtResearchName.Text;
rs.Content = txtResearchDescrip.Text;
if(isShow.Checked)
{
rs.IsShow = true;
}
else
{
rs.IsShow = false;
}
if(danxuan.Checked && !fuxuan.Checked)
{
rs.Type = 0;
}
else
{
rs.Type = 1;
}
rs.JoinDate = DateTime.Now;
//string[] authors = new string[cblAuth.Items.Count];
// int i = 0;
// foreach(ListItem li in cblAuth.Items)
// {
// authors[i++] = li.Selected == true ? "1" : "0";
// }
// rs.AuthorityValues = authors;
if (rs.ID == 0)
{
rs.Insert();
Back();
}
else
{
rs.Update();
Back();
}
}
}
}
<%@ Control Language="c#" AutoEventWireup="false" CodeFile="AddSearch.ascx.cs" Codebehind="AddSearch.ascx.cs" Inherits="YiWangDian.Web.Admin.Ascx.AddSearch" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<FORM id="Form1" runat="server">
<TABLE id="Table1" cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
<TR>
<TD class="C_Left_03" valign="top" align="left" width="8"><IMG height="7" src="Images/JiSu_Admin_22.gif" width="8"></TD>
<TD class="C_Left_01"> </TD>
<TD class="C_Left_04" valign="top" align="right" width="8"><IMG height="7" src="Images/JiSu_Admin_25.gif" width="8"></TD>
</TR>
<TR>
<TD class="C_Left_03"> </TD>
<TD class="C_Middle">
<TABLE class="SubMenu_Item" id="Table2" cellspacing="0" cellpadding="0" width="100%" border="0">
<TR>
<TD>
<TABLE id="Table3" cellspacing="0" cellpadding="0" border="0">
<TR>
<TD class="Default_Item"><A href="Research.aspx" target="main">调查列表</A></TD>
<TD class="Current_Item"><A href="Research.aspx?op=1" target="main">添加调查</A></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE id="Table4" cellspacing="1" cellpadding="0" width="100%" align="center" border="0">
<TR>
<TD class="AddGoods_Left" width="20%">调查名:</TD>
<TD class="AddGoods_Right" style="WIDTH: 80px"><asp:textbox id="txtResearchName" runat="server" Width="180px"></asp:textbox></TD>
<TD class="AddGoods_Right"><asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" Display="Dynamic" ControlToValidate="txtResearchName"
ErrorMessage="*调查名不能为空!"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD class="AddGoods_Left" style="HEIGHT: 132px">调查描述:</TD>
<TD class="AddGoods_Right" style="WIDTH: 80px; HEIGHT: 132px"><asp:textbox id="txtResearchDescrip" runat="server" Width="336px" TextMode="MultiLine" Height="123px"></asp:textbox></TD>
<TD class="AddGoods_Right" style="HEIGHT: 132px"><asp:requiredfieldvalidator id="Requiredfieldvalidator2" runat="server" Display="Dynamic" ControlToValidate="txtResearchDescrip"
ErrorMessage="*调查描述不能为空!"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD class="AddGoods_Left" style="HEIGHT: 41px">设置:</TD>
<TD class="AddGoods_Right" style="HEIGHT: 41px" colSpan="2">
<TABLE id="Table5" style="WIDTH: 496px; HEIGHT: 47px" cellspacing="1" cellpadding="1" border="0">
<TR>
<TD class="AddGoods_Right" style="HEIGHT: 26px" colSpan="3"><asp:checkbox id="isShow" runat="server" Text="是否显示"></asp:checkbox> </TD>
</TR>
<TR>
<TD class="AddGoods_Right" colSpan="3"><asp:radiobutton id="danxuan" Runat="server" GroupName="ShowSet" Text="单选" Checked="True"></asp:radiobutton><asp:radiobutton id="fuxuan" Runat="server" GroupName="ShowSet" Text="复选"></asp:radiobutton></TD>
</TR>
<TR>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD class="C_page"> </TD>
<TD class="C_page" colSpan="2"><asp:button class="C_input02" id="buttonOK" Runat="server" Text="添加"></asp:button></TD>
</TR>
</TABLE>
</TD>
<TD class="C_Left_04"> </TD>
</TR>
<TR>
<TD class="C_Left_03" valign="bottom" width="8"><IMG height="8" src="Images/JiSu_Admin_48.gif" width="8"></TD>
<TD class="C_Left_02"> </TD>
<TD class="C_Left_04" valign="bottom" width="8"><IMG height="8" src="Images/JiSu_Admin_51.gif" width="8"></TD>
</TR>
</TABLE>
</FORM>
补充:.NET技术 , ASP.NET