小编Flo*_*Flo的帖子

ASP.NET分析器错误消息:无法加载类型"搜索".从另一个项目复制文件后

我在visual studio有一个工作网站的网站项目.我可以毫无问题地查看所有页面.

现在我从另一个Web应用程序项目复制了2个文件:search.aspx search.aspx.vb

search.aspx源代码段

<%@ Page EnableViewState="true" EnableEventValidation="false" MetaDescription="<%$Resources:metadescription%>" Title="<%$Resources:pagetitle %>" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="search" Codebehind="search.aspx.vb" %>
<%@ MasterType VirtualPath="~/main.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
Run Code Online (Sandbox Code Playgroud)

search.aspx.vb源代码段

Imports System
Imports System.Net
Imports System.IO
Imports GlobalFunctions
Imports System.Xml
Imports System.Collections.Generic
Imports System.Collections
Imports System.Linq
Imports System.Resources
Imports generalMethods
Imports System.Globalization

Partial Class search
    Inherits System.Web.UI.Page
Run Code Online (Sandbox Code Playgroud)

但是当我尝试请求页面时:www.test.com/search.aspx我收到此错误:说明:解析为此请求提供服务所需的资源时发生错误.请查看以下特定的解析错误详细信息并相应地修改源文件.

分析器错误消息:无法加载类型"搜索".

来源错误:

Line 1:  <%@ Page EnableViewState="true" EnableEventValidation="false" MetaDescription="<%$Resources:metadescription%>" Title="<%$Resources:pagetitle %>" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="search" Codebehind="search.aspx.vb" %>
Line 2:  
Line 3:  <%@ MasterType …
Run Code Online (Sandbox Code Playgroud)

asp.net

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

如何定义XSL变量并在xsl:choose中分配值

我想在XSL中定义一个名为'category'的变量,为它赋值,并在我的代码中重新使用该变量.如果objecttype = 1,则变量值应为'car',如果objecttype = 2,则变量值应为'bus'

我怎样才能做到这一点?

<xsl:template match="/">
<html>
<head><style type="text/css">body{font-size:11px;font-family:Verdana;}</style></head>
<body>
Dear
<xsl:for-each select="user">
<xsl:value-of select="firstname"/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
<xsl:if test="middlename != ''"> 
<xsl:value-of select="middlename"/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:value-of select="user/lastname"/>,<br/>
<br/>
You have created a company listing for "<xsl:value-of select="user/objecttitle"/>".<br/>
<br/>
Did you know Google uses the number of Facebook 'likes' for webpages in its rankings?<br/>
You can like you page here: 
<xsl:for-each select="user"> 
<xsl:variable name="category"> 
    <xsl:choose> 
        <xsl:when test="objecttype='1'">car</xsl:when> 
        <xsl:when test="objecttype='2'">bus</xsl:when> 
    </xsl:choose> 
</xsl:variable> 
</xsl:for-each> 
<a href="http://www.mydomain.com/{$category}/{user/objectid}/{user/objecturl}">Click here to go to your …
Run Code Online (Sandbox Code Playgroud)

xml xslt

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

HTTP错误500.19 - 内部服务器错误无法访问请求的页面,因为页面的相关配置数据无效

我重新安装了Windows,现在正在配置所有内容以使我的机器重新启动并运行.导航到www.mysite.com时我收到此错误: 在此输入图像描述

我查看了各种论坛,并为IIS_IUSRS,IUSR,Everyone和NETWORK SERVICE提供了文件夹c:\ dropbpx\inetpub\mysite完整权限,但我一直收到错误消息.我还在%WINDIR%\ System32\inetsrv\config \中的applicationhost.config上给出了IIS_IUSRS的完全权限

此外,当我通过IIS访问我的网站并单击"身份验证"时,我收到错误:执行此操作时出错.详细信息:文件名:\?\ C:\ Dropbox\inetpub\mysite\web.config错误:

我的网站的应用程序池设置为ASP.NET v4.0

在这里看到我的web.config

<?xml version="1.0" encoding="UTF-8"?>

<!--
For more information on how to configure your ASP.NET application, please visit  http://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>


<connectionStrings>
<add name="conn1" connectionString="data source=(local);Initial Catalog=tt;User Id=sa;Password=dfsdf3454sdg;" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web.extensions>
<scripting>
  <webServices>
    <jsonSerialization maxJsonLength="5000000" />
  </webServices>
</scripting>
</system.web.extensions>

<system.web>
<httpRuntime maxRequestLength="5120000" requestValidationMode="2.0" />  
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />

<sessionState mode="InProc" timeout="60" />
<authentication mode="Forms">
  <forms name=".MyCookie" slidingExpiration="true" timeout="60" cookieless="AutoDetect" loginUrl="/login/" protection="All" defaultUrl="/">
    <credentials passwordFormat="SHA1" />
  </forms>
</authentication> …
Run Code Online (Sandbox Code Playgroud)

iis-7.5

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

荷兰电话号码的正则表达式

我正在寻找一个匹配荷兰电话号码的正则表达式.这些是格式要求:

  • 应该从0开始
  • 包含最多1个(可选)短划线" - "字符,现在它无关紧要,只要它不是第一个字符
  • 总长度10或11个字符

这是我到目前为止所提出的:

^0+-{1}?([0-9]{10,11})$
Run Code Online (Sandbox Code Playgroud)

regex phone-number

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

窗口函数和 NEXT VALUE FOR 函数不支持常量作为 ORDER BY 子句表达式

运行此语句时出现错误 Windowed functions and NEXT VALUE FOR functions do not support constants as ORDER BY clause expressions.

SELECT * FROM (select ROW_NUMBER() OVER (ORDER BY 'publishdate DESC') as RowNum,
* FROM news WHERE publishdate <=getdate()) as info
WHERE RowNum > 0 AND RowNum <= (100)
Run Code Online (Sandbox Code Playgroud)

我想使用此语句在分页网格视图中检索结果集。

如何让这个语句运行?

t-sql sql-server pagination sql-order-by

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

具有视口大小但也具有最大宽度的Fancybox

我在我的网站上使用Fancybox2(fancybox.net).当显示ligthbox时,我希望它根据浏览器的屏幕宽度进行调整,因此最好在移动设备和桌面设备上查看.但是,在桌面上我希望盒子的最大宽度为500px.

我正在寻找一个max-width选项,但我找不到http://fancybox.net/api如何做到这一点.

css jquery fancybox responsive-design fancybox-2

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

jQuery等待元素属性具有值

我有一个元素

<span id="current" data=""></span>
Run Code Online (Sandbox Code Playgroud)

data属性的值将由异步 AJAX 函数填充。我无法将此函数更改为同步或让它返回值。

这是代码的一部分

$("#popup #save").click(function () {

    //setting a lot of vars here

    var id = $("#current").val();

    if (id == '') {
        //new  so insert

        $.ajax({
            type: "GET",
            url: myurl,
            data: "",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                $("#loadstatus").html('');
                //returns new id
                if (data > 0) {
                    $('#current').val(data);
                }
            }
        });
    }
    else {
        //existing  so update
        //more code
    }

    return false;

});



    var id = $("#current").val();
    if (id == …
Run Code Online (Sandbox Code Playgroud)

jquery wait

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

在SQL Server数据导入工具中缺少Microsoft Excel作为选项

我在64位Windows Server 2012 R2上运行SQL Server 2012.
我没有安装MS Office.
我现在注意到,当我启动Start-> Program Files-> Microsoft SQL Server 2012->导入和导出数据(64位)时,数据源下拉列表中缺少MS Excel文件选项.如何在不必在服务器上安装Excel或Office的情况下获得该选项?

64-bit excel-2007 import-from-excel sql-server-2012 windows-server-2012-r2

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

Microdata可以应用于任何类型的HTML元素吗?

在网络上的所有示例中,我都看到了Microdata属性itemscopeitemtype应用于div元素,如下所示:

<div itemscope itemtype ="http://schema.org/Movie">
  <h1 itemprop="name">Avatar</h1>
  <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
  <span itemprop="genre">Science fiction</span>
  <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>
Run Code Online (Sandbox Code Playgroud)

但是Microdata可以应用于任何其他元素,在我的情况下,我想将它应用于列表项:

<ul>
<li itemscope itemtype ="http://schema.org/Movie">
  <h1 itemprop="name">Avatar</h1>
  <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
  <span itemprop="genre">Science fiction</span>
  <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</li>
</ul>
Run Code Online (Sandbox Code Playgroud)

这有什么已知的问题吗?

html markup microdata

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

重写规则不正确过滤推荐垃圾邮件(不再)

我已将下面的重写规则添加到我的web.config中.它完美地工作,阻止所有提到的推荐垃圾网站.但是,今天突然我注意到social-buttons.com我的Google Analytics 中出现了这个问题.这可能与我在下面定义的规则有关吗?

    <rule name="abort referer spam requests" stopProcessing="true">
      <match url=".*" />
      <conditions>
         <add input="{HTTP_REFERER}" pattern="(semalt\.com)|(buttons\-for\-website\.com)|(simple\-share\-buttons\.com)|(darodar\.com)|(social\-buttons\.com)" />
      </conditions>
      <action type="AbortRequest" />
    </rule>
Run Code Online (Sandbox Code Playgroud)

referrer-spam iis-7.5 url-rewrite-module

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