我知道.Contains()方法确实喜欢LIKE %therm%,.StartsWith()方法确实喜欢LIKE therm%和.EndsWith()方法一样LIKE %therm但是......
有没有办法在下面做**Linq to Entities**?
SELECT * FROM [dbo].[Users] WHERE Name LIKE 'rodrigo%otavio%diniz%waltenberg'
Run Code Online (Sandbox Code Playgroud)
PS:我正在使用LINQ to ENTITIES.不是LINQ TO SQL
我正在开发一个MVC2应用程序并在其上使用表单身份验证.
脚本,图像和样式都被阻止给未记录的用户,因此登录页面看起来很糟糕.
它在本地运行良好,问题是当我发布到服务器时.
有谁有任何想法为什么????
PS:服务器IIS是7.5版
我的Web.config:
<configuration>
<system.web>
<globalization culture="pt-BR" uiCulture="pt-BR" />
<httpRuntime requestValidationMode="2.0"/>
<customErrors mode="Off" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<pages>
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="Admin.Models" />
</namespaces>
</pages>
<authentication mode="Forms">
<forms name="AGAuth" loginUrl="~/Home/Login" timeout="120" />
</authentication>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> …Run Code Online (Sandbox Code Playgroud) asp.net asp.net-mvc forms-authentication iis-7.5 asp.net-mvc-2
你可以帮我一个函数来替换字符串如下:
字符串the boo[k|ks] [is|are] on the table将输出the book is on the table或the books are on the table根据参数.
<?php
$unformated_str = "the boo[k|ks] [is|are] on the table";
$plural = true;
echo formatstr($unformated_str, $plural);
?>
Run Code Online (Sandbox Code Playgroud)
输出:
the books are on the table
Run Code Online (Sandbox Code Playgroud)
原谅我可怜的英语.我希望我的问题足够清楚.
可能重复:
使用JavaScript播放声音
我正在为我的网站进行javascript聊天,当有新消息并且聊天没有集中时,我需要播放声音,就像Facebook的聊天一样.问题是我不知道如何用javascript在后台播放这个声音.你可以帮帮我吗?
编辑:没有Flash的Crossbrowser解决方案会更好