小编3 r*_*les的帖子

如何防止ckeditor不添加  在空白的html标签

我在Windows 8.1操作系统中安装了Visual Studio 2012 Express,并根据要求在我的项目中使用CKEditor.

我是CKEditor的新手并以正确的方式使用它但问题是通过在CKEditor中定义源代码中的html它会自动替换

<div><i class="classname"></i></div>
Run Code Online (Sandbox Code Playgroud)

<div>&nbsp;</div> or <div></div>
Run Code Online (Sandbox Code Playgroud)

那么如何防止CKEditor不替换它并保存原样呢?我有一些解决方案但仍然有点错误我正在更换

<i class="classname"></i>
Run Code Online (Sandbox Code Playgroud)

<div class="classname"></div>
Run Code Online (Sandbox Code Playgroud)

但在标签之间它自动添加 .

如何防止它不添加 ?

在下面的图像中,CKEditor处于打开状态,您可以在圆形区域中看到它会自动在我的代码中添加一些空格或制表符.

怎么阻止?

在此输入图像描述

html ckeditor visual-studio-2012

10
推荐指数
1
解决办法
3177
查看次数

如何使用角度js和数据表与额​​外的行和列绑定数据

您好我正在使用angularjs创建一个应用程序,并使用数据表js创建ASP.NET MVC.

我一直在使用的数据表与帮助的角度JS实现表显示数据文章.

但我想在html中使用相同的功能与静态的列名绑定数据,如:

在文章中,作者使用以下方法完成了

<table id="entry-grid" datatable="" dt-options="dtOptions" 
       dt-columns="dtColumns" class="table table-hover">
</table>
Run Code Online (Sandbox Code Playgroud)

但是我希望按照我的数据使用ng-repeat使用相同的功能,这样做:

<table id="tblusers" class="table table-bordered table-striped table-condensed datatable">
  <thead>
    <tr>
      <th width="2%"></th>
      <th>User Name</th>
      <th>Email</th>
      <th>LoginID</th>
      <th>Location Name</th>
      <th>Role</th>
      <th width="7%" class="center-text">Active</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="user in Users">
      <td><a href="#" ng-click="DeleteUser(user)"><span class="icon-trash"></span></a></td>
      <td><a class="ahyperlink" href="#" ng-click="EditUser(user)">{{user.UserFirstName}} {{user.UserLastName}}</a></td>
      <td>{{user.UserEmail}}</td>
      <td>{{user.LoginID}}</td>
      <td>{{user.LocationName}}</td>
      <td>{{user.RoleName}}</td>
      <td class="center-text" ng-if="user.IsActive == true"><span class="icon-check2"></span></td>
      <td class="center-text" ng-if="user.IsActive == false"><span class="icon-close"></span></td>
    </tr>
  </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

我还想在按钮中单击添加新记录使用相同的功能在表格中添加新列.

可能吗?

如果是的话怎么可能会很好,如果有人在jsfiddle或任何编辑器中向我展示,那么事先谢谢.

下载在Visual Studio Editor中创建的源代码以进行演示

datatables angularjs angular-datatables

10
推荐指数
1
解决办法
7353
查看次数

无预览打印本地报告 - 超出流大小或GDI + C#中发生一般错误

我正在使用这篇文章将我的rdlc直接打印到打印机,但是当我试图Metafile通过传递stream它来创建对象时给了我错误.(GDI +中发生一般错误)

码:

 using System;
    using System.IO;
    using System.Data;
    using System.Text;
    using System.Drawing.Imaging;
    using System.Drawing.Printing;
    using System.Collections.Generic;
    using System.Windows.Forms;
    using Microsoft.Reporting.WinForms;

    public class Demo : IDisposable
    {
        private int m_currentPageIndex;
        private IList<Stream> m_streams;

        // Routine to provide to the report renderer, in order to
        //    save an image for each page of the report.
 private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
        {
            DataSet ds = new DataSet(); …
Run Code Online (Sandbox Code Playgroud)

c# printing rdlc stream metafile

8
推荐指数
1
解决办法
506
查看次数

LINQ to Entities查询中无法初始化实现IEnumerable'System.Collections.Generic.List`1'的类型

我试图在Linq查询中创建一些类的对象但是给我一个错误作为问题的设置标题.

我的查询是:

List<oneViewModel> workOrderInfoList = (from abc in db.ABC
  join customer in db.Customers on abc.CustomerId equals customer.CustomerId into customers
  select new oneViewModel()
  {
     CustomerId = abc.CustomerId,
     OrderNumber = workOrderInfo.OrderNumber,
     OrderDate = abc.OrderDate,
     SecondClassList = new List<SecondClass>(),
  }).ToList();
Run Code Online (Sandbox Code Playgroud)

我已经在oneViewModel中定义了作为对象的类列表.

public class ABC        
{
    public DateTime? WorkOrderDate { get; set; }
    public long CustomerId { get; set; }

    public string CustomerName { get; set; }

    public List<SecondClass> SecondClassList { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

c# linq initialization object

6
推荐指数
1
解决办法
3292
查看次数

Azure网站加载需要很长时间

您好,我最近在azure门户上部署了我的一个应用程序,它也运行良好,但是这个问题在站点加载时首次需要15秒才能加载。

站点加载成功一次后,它运行良好,但是当我在10分钟或20分钟的间隔时间后再次打开时,需要15秒才能加载

我已经阅读了所有文档,并在下面应用了相同的内容。

性能技巧

交通经理例行程序

Azure顾问

应用洞察

Azure网站性能

SOF问题

Azure资源运行状况

排程器

我已将Scheduler设置为每隔10分钟调用一次我的应用程序,但是它具有与以前相同的问题。

我发现的一个问题是,定位服务器并花时间而不是给出响应,因此我可以提供任何路由机制来确保更快地定位服务器吗?或其他任何东西。

azure load-time page-load-time azureportal

6
推荐指数
1
解决办法
2143
查看次数

Azure应用服务停止工作一段时间

从5到6个月以来,我一直在Azure门户上托管我的客户端(Web应用程序)和服务(Web API)应用程序。

自同一天托管我的应用程序以来,我面临的问题是,当我第一次调用我的api从客户端Web应用程序加载下拉列表时,这给了我一段时间超时错误,但有时它花费的时间比预期的多来自api的结果,因此客户端必须等待响应到来。

第一次成功尝试后,它的运行速度比预期的要快,但第一次它会由于延迟获取结果而工作了一段时间,或者有时会抛出超时错误。

我曾经使用调度程序来不时调用api,但这也没有帮助。

任何人都可以分享的其他想法,我会很高兴,并在此先感谢。

timeout azure azure-web-sites

3
推荐指数
1
解决办法
1310
查看次数

在javascript中将Json日期转换为“日期”

我在 C# 中使用 Visual Studio 2013。

我正在调用一个 ActionResult 方法,该方法从 Ajax 返回数据列表。

这里的问题是我得到的日期为"/Date(1460008501597)/".

我不知道如何使用 javascript 将其转换为显示在表单上。

请有人帮助我这对我来说很难解决。

javascript jquery date

2
推荐指数
2
解决办法
5386
查看次数

在循环中读取 Sql 服务器中的逗号分隔字符串

我有这样的 nvarchar 数据:

'20030,20031,20033,20034,20065,20045,20044'

我想通过拆分成数组来读取所有这些,或者在拆分过程中逐一读取并进行进一步的处理。

我已经尝试过这篇好文章,但无法做到。

sql-server split nvarchar

2
推荐指数
1
解决办法
3万
查看次数

如何设置JsonRequestBehavior.AllowGet与返回JsonResult

我将asp.net mvc actionmethod称为JsonResult作为返回类型,并返回至少具有50000 racords的数据列表,并希望设置Ajax返回的大小,并且它也完成了。

但是当我返回值时,会抛出一个错误:

This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.
Run Code Online (Sandbox Code Playgroud)

我的代码:

return new JsonResult()
            {
                Data = mydatalist,
                MaxJsonLength = Int32.MaxValue
            };
Run Code Online (Sandbox Code Playgroud)

在这里我想设置JsonRequestBehavior.AllowGet,但是在哪里以及如何不知道?

在事先感谢之前,任何人都可以这样做。

asp.net-mvc serialization json jsonresult json-deserialization

2
推荐指数
1
解决办法
2321
查看次数