小编ask*_*skm的帖子

如何在 HTML pre 标签中禁用水平滚动

我正在尝试禁用 HTML pre 标签中的水平滚动

我试过这个:

pre {
    height: auto;
    max-height: 500px;
    overflow:hidden;
    background-color: #eeeeee;
}
Run Code Online (Sandbox Code Playgroud)

但它不能正常工作

它看起来像这样:

在此处输入图片说明

文本继续向左边缘。(我的html页面的方向是RTL Right to Left)

有什么建议吗?

html javascript css jquery web-frontend

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

如何使用LINQ MVC基于AND条件应用搜索过滤

我正在研究asp.net-mvc项目

我想基于参数过滤记录(大多数是Veiw中的下拉列表)使用LINQ with(AND condition),但我的问题是null或空参数.

有时用户过滤基于一个或两个字段的记录,其余字段值返回为空.那么没有结果符合条件.

目前我使用(OR条件)来获取想要的记录:

 public ActionResult Search(int? ReportID, int? ReportName, int? Department, string ManagerConfirmationState1, string RiskLevel, string NoteType)
    {




        ViewBag.ReportID = new SelectList(db.Reports, "ReportID", "ReportID");
        ViewBag.ReportName = new SelectList(db.Reports, "ReportID", "ReportName");
        ViewBag.Department = new SelectList(db.Departments, "DepartmentID", "DepartmentName");
        ViewBag.ManagerConfirmationState1 = new SelectList(db.ManagerConfirmationState1, "ManagerConfirmationState1ID", "ManagerConfirmationState11");
        ViewBag.RiskLevel = new SelectList(db.RiskLevels, "RiskLevelID", "RiskLevel1");
        ViewBag.NoteType = new SelectList(db.NoteTypes, "NoteTypeID", "NoteType1");

        var Notes = from n in db.Notes
                    select n;


        //filteration

        Notes = Notes.Where(n => n.ReportID == ReportID
                                   || n.Report.ReportID == ReportName
                                   || n.Report.Department.DepartmentID …
Run Code Online (Sandbox Code Playgroud)

c# linq asp.net-mvc search filtering

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

标签 统计

asp.net-mvc ×1

c# ×1

css ×1

filtering ×1

html ×1

javascript ×1

jquery ×1

linq ×1

search ×1

web-frontend ×1