问题描述
“/”应用程序中的服务器错误。--------------------------------------------------------------------------------分析器错误说明:在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。分析器错误消息:未能加载类型“InternetShopping.Proshow”。源错误:行1:<%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="Proshow.aspx.cs"Inherits="InternetShopping.Proshow"%>行2:行3:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">源文件:/Proshow.aspx行:1第一行<%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="Proshow.aspx.cs"Inherits="InternetShopping.Proshow"%>下面是CSusingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;namespaceInternetShopping{publicpartialclassProshow:System.Web.UI.Page{DataClassesDataContextdb=newDataClassesDataContext();protectedvoidPage_Load(objectsender,EventArgse){if(Request.QueryString.Count!=0){Bind();//调用自定义方法Bind()绑定商品信息到gvProduct}}privatevoidBind(){//获取选择的分类Idif(Request.QueryString["CategoryId"]!=null){intcategoryId=int.Parse(Request.QueryString["CategoryId"]);//在Products表中查找满足条件的产品varproducts=frompindb.Productwherep.CategoryId==categoryIdselectp;//将查找到的产品绑定到gvProductgvProduct.DataSource=products;gvProduct.DataBind();}}protectedvoidgvProduct_PageIndexChanging(objectsender,GridViewPageEventArgse){//设置当前页索引值为新的页面索引值gvProduct.PageIndex=e.NewPageIndex;Bind();//调用自定义方法Bind()}}}