问题集

1.  Role如何添加Description?
2.  ASP.NET程序如何取消对asp文件的禁止?
3.  同一个功能,有时候可以,有时候不行?
4.  Request.Form得不到值?
5.  DataList的ItemCreated事件得到数据源转换为DataRow报错

private void DataListProductImageList_ItemCreated(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
{
   DataRow dr = (DataRow)e.Item.DataItem;
   if(dr["img"].ToString() == "")
   {
      dr["img"] = "noImage.gif";
   }
}

指定的转换无效。
行 92: DataRow dr = (DataRow)e.Item.DataItem;

6.求一个无限级分类分页的思路!
现在需要在网页中按照分页进行显示,显示的条件有三个: 
1.  按照表中某个字段进行查询。 
2.  每页显示规定的记录数。 
3.  当前页的索引对应表中的一段记录。 
 
条件2,3都好说,条件1把我难倒了。 
 
首先,这个字段我事先并不知道,只知道是可供选择的几个字段中的某一个。 
其次,我需要传递一个参数放入这个字段条件中,而这个参数我也不知道是对应表中的那个字段。 
 
假设,现在有三个字段,我把这三个字段想象成一条记录的三个分类,我要指定其中的一个分类来条件查询这一条记录。 
 
表名:table 
字段:Id  f1  f2  f3  content 
 
表名:f1_t 
字段:Id  value 
 
表名:f2_t 
字段:Id  value 
 
表名:f3_t 
字段:Id  value 
 
表f1_t、f2_t、f3_t的Id分别对应table表中的f1,f2,f3的值 
 
用户在网页中点击一个超链接(网页上显示:按某某类型查看),将这个链接对应的ID值传给存储过程的一个参数。 
@ID 
 
这个@ID要指定到table表的f1、f2、f3上去,但是只能指定其中一个。(f1,f2,f3可能有重复的数据) 
 
如果我做三个参数,那么这个问题就好办了,但是如果是无限级分类,就不知道有多少个参数了,我认为应该只能传一个参数。 

7.水晶报表导出Excel文件报登陆失败!

public  override  void  Import(string  ddlFormat) 

       CrystalDecisions.Shared.DiskFileDestinationOptions  DiskOpts  =  new      CrystalDecisions.Shared.DiskFileDestinationOptions(); 
       ReportDoc.ExportOptions.ExportDestinationType  =          CrystalDecisions.Shared.ExportDestinationType.DiskFile; 
     switch  (ddlFormat) 
     { 
           case  "Rich  Text  (RTF)": 
           ReportDoc.ExportOptions.ExportFormatType  =        CrystalDecisions.Shared.ExportFormatType.RichText;// 
           DiskOpts.DiskFileName  =  "c://Output.rtf";// 
           break; 
           case  "Portable  Document  (PDF)": 
                 ReportDoc.ExportOptions.ExportFormatType  =      CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;// 
                 DiskOpts.DiskFileName  =  "c://Output.pdf";// 
           break; 
           case  "MS  Word  (DOC)": 
               ReportDoc.ExportOptions.ExportFormatType  =      CrystalDecisions.Shared.ExportFormatType.WordForWindows;// 
       DiskOpts.DiskFileName  =  "c://Output.doc";// 
           break; 
         case  "MS  Excel  (XLS)": 
         ReportDoc.ExportOptions.ExportFormatType  =  CrystalDecisions.Shared.ExportFormatType.Excel;// 
       DiskOpts.DiskFileName  =  "c://Output.xls";// 
       break; 
       default: 
       break; 
   } 
   ReportDoc.ExportOptions.DestinationOptions  =  DiskOpts; 
   ReportDoc.Export(); 
}

为什么序列化之后对象属性中的“符号”在xml中变成乱码了?
<?xml  version="1.0"  encoding="utf-8"  ?>   
<Sections  xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
<Section  id="行业动态"> 
   <Image  url="C:_x005C_Documents_x0020_and_x0020_Settings_x005C_Administrator_x005C_My_x0020_Documents_x005C_x0020_files_x005C_Title5.jpg"  />   
   </Section> 
   </Sections> 
 
上面的“/”符号都变成_x005C了。怎么回事?

8.奇怪!同一段代码放在ASP.NET中可以正常运行,放在Web Service中就报错。

public  class  DBAccess 

     SqlCommand  cmd  =  null; 
     public  DBAccess(  string  sprocName,  SqlParameter[]  parameters  ) 
     { 
           SqlConnection  conn  =  new  SqlConnection  (System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]); 
           cmd  =  new  SqlCommand(); 
           cmd.Connection  =  conn; 
           cmd.CommandText  =  sprocName; 
           cmd.CommandType  =  CommandType.StoredProcedure; 
           foreach(  SqlParameter  parameter  in  parameters  ) 
           { 
                 cmd.Parameters.Add(parameter); 
           } 
           cmd.Connection.Open();//ASP.NET中能通过,WebService中不能通过 
     } 
}

9.错误1406。未能将值写入项/Software/Classes/.htm/OpenWithList/devenv.exe。请验证您是否有足够的权限访问该项,或者与技术支持人员联系

在win2000pro里用VS.NET2003的*.iso文件安装的时候总是弹出以下错误提示: 
 
错误1406。未能将值写入项/Software/Classes/.htm/OpenWithList/devenv.exe。请验证您是否有足够的权限访问该项,或者与技术支持人员联系。 

10.“调试器无法继续运行程序。无法保存。” 
今天打开项目,突然报告以上错误,运行不了项目也关不掉VS.NET了,要结束任务才能关。 
所有的项目都是如此,不知道出了什么问题?

11.水晶报表导出文件提示登陆失败!

水晶报表导出文件提示登陆失败! 
 
public  override  void  Import(string  ddlFormat) 

       CrystalDecisions.Shared.DiskFileDestinationOptions  DiskOpts  =  new      CrystalDecisions.Shared.DiskFileDestinationOptions(); 
       ReportDoc.ExportOptions.ExportDestinationType  =          CrystalDecisions.Shared.ExportDestinationType.DiskFile; 
     switch  (ddlFormat) 
     { 
           case  "Rich  Text  (RTF)": 
                 ReportDoc.ExportOptions.ExportFormatType  =        CrystalDecisions.Shared.ExportFormatType.RichText;// 
           DiskOpts.DiskFileName  =  "c://Output.rtf";// 
           break; 
           case  "Portable  Document  (PDF)": 
                 ReportDoc.ExportOptions.ExportFormatType  =      CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;// 
                 DiskOpts.DiskFileName  =  "c://Output.pdf";// 
           break; 
           case  "MS  Word  (DOC)": 
               ReportDoc.ExportOptions.ExportFormatType  =      CrystalDecisions.Shared.ExportFormatType.WordForWindows;// 
       DiskOpts.DiskFileName  =  "c://Output.doc";// 
           break; 
         case  "MS  Excel  (XLS)": 
               ReportDoc.ExportOptions.ExportFormatType  =  CrystalDecisions.Shared.ExportFormatType.Excel;// 
       DiskOpts.DiskFileName  =  "c://Output.xls";// 
       break; 
       default: 
       break; 
   } 
   ReportDoc.ExportOptions.DestinationOptions  =  DiskOpts; 
   ReportDoc.Export(); 

12.在WebForm中实现打印页面的功能,如何获得打印机的名字?(非浏览器打印)

13.请问如何自动获取当前焦点所在网站的HTML内容?

14.数据库队列异步连接如何做?
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值