我的页面加载操作结果和http post动作结果都传递给模型.
[Authorize]
public ActionResult StepTwo(PostcodesModel model)
{
return View();
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult StepTwo(PostcodesModel model)
{
return View();
}
Run Code Online (Sandbox Code Playgroud)
既然他们都参与了模型,我可以添加什么来使它们独一无二?
嘿,我有以下列表
List<int> pos = new List<int>();
for (int i = 0; i < combinedResults.Length; i++)
{
if (combinedResults[i])
{
pos.Add(i);
}
}
Run Code Online (Sandbox Code Playgroud)
但似乎最后一个数组项是我想要首先显示的那些,所以我想知道如何反转List?
在CSS中你可以使用.5增量,即
font-size: 8.5pt;
Run Code Online (Sandbox Code Playgroud)
看不到font-size:8pt和font-size:8.5pt之间的区别
尝试以下..
bool success = File.Exists(@"\\comp01\BatchFiles\InputFile\Test.txt");
Run Code Online (Sandbox Code Playgroud)
它的返回false(文件确实存在)
当我尝试
var dirInfo = new DirectoryInfo(@"\\comp01\BatchFiles\InputFile");
if (dirInfo.Exists)
Run Code Online (Sandbox Code Playgroud)
它回来了true.
所以它可以找到路径而不是文件?
有什么理由吗?
目前有一个这样的循环遍历每个li,并在Li中查找某些内容并添加一个类.问题是布局有多个UL,即我希望它在每个UL中找到li.现在它停止第一个瞬间,它发现任何符合我的IF标准的li.
var list = $('.sampleAddress li span');
$(list.get().reverse()).each(function () {
var currentLine = $(this).html();
var unmatched = unmatchedLine;
if (currentLine.indexOf(unmatched) !== -1) {
$(this).html($(this).text().replace(" ", " ").replace("&", "&").replace(unmatchedLine.toUpperCase(), '<span class="matchedClass">' + unmatchedLine.toUpperCase() + '</span>'));
return false;
}
});
Run Code Online (Sandbox Code Playgroud)
HTML的布局如下
<ul class="boxSlider">
<li>
<ul class="sampleAddress">
<li><span>something</span></li>
<li><span>something</span></li>
<li><span>something</span></li>
</ul>
</li>
<li>
<ul class="sampleAddress">
<li><span>something</span></li>
<li><span>something</span></li>
<li><span>something</span></li>
</ul>
</li>
</ul>
Run Code Online (Sandbox Code Playgroud) 我有一个 URL 验证器,如下所示
(^|\s)((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)
Run Code Online (Sandbox Code Playgroud)
这似乎涵盖了大多数基础,但它不能,即允许 localhost url
我想允许
http://localhost:8080
Run Code Online (Sandbox Code Playgroud)
或者
localhost:8080
Run Code Online (Sandbox Code Playgroud)
但我不想允许像这样的简单字符串
http://google
Run Code Online (Sandbox Code Playgroud)
或者
google
Run Code Online (Sandbox Code Playgroud) 基本上我正在尝试这样做
InputString = InputString.Replace(""", """);
Run Code Online (Sandbox Code Playgroud)
但是得到一个错误
所以我有一个带背景图像的div; 这个div可以根据div的空间内容/大小增加高度和宽度.
但是,无论我希望背景图像的大小是100%显示,这是因为背景图像周围有边框,我需要显示那些按钮效果.
div.leadgen {
background: url(/Website6/Styles/leadgen_center.png) repeat-x;
color: #FFF;
cursor: pointer;
display: inline-block;
}
<div class="leadgen">
<h3>
This is the title
</h3>
This is the description
</div>
Run Code Online (Sandbox Code Playgroud)
编辑
#solutionsNav div.leadgen {
background:url(/images/leadGen_bg2.png) no-repeat;
background-size: 100% 100%;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/leadGen_bg2.png', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/leadGen_bg2.png', sizingMethod='scale')";
behavior: url(/scripts/PIE.htc);
padding: 10px;
color: #FFF;
cursor: pointer;
Run Code Online (Sandbox Code Playgroud)
}
这适用于所有浏览器!我唯一需要弄清楚的是在IE 7和8中我不想使用background:url(/images/leadGen_bg2.png)no-repeat; 因为它似乎加倍了.
所以我试图在sitecore中设置处理具有两个不同主机头的多站点设置.但无论我做什么,它总是恢复到主机头的默认站点.
所以目前我的默认设置在我的网络配置中,如下所示:
<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/Home Page" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" hostname="localhost" loginPage="/Account/SourceLoginRouter" />
Run Code Online (Sandbox Code Playgroud)
而我正在尝试添加的新版本
<site name="SmartEmea" hostName="secondSite" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/SmartEmea" startItem="/Home" database="master" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" language="nl-NL" customLinkManager="ValtechLinkManager"/>
Run Code Online (Sandbox Code Playgroud)
我的主机文件如下
127.0.0.1 localhost
127.0.0.1 secondSite
Run Code Online (Sandbox Code Playgroud)
但无论怎样它总是恢复到它的网站和rootpath的/sitecore/content