我试图将焦点设置为ASP.NET登录控件内的用户名TextBox.
我曾试图通过几种方式做到这一点,但似乎没有一种方法可行.页面正在加载但不会进入控件.
这是我试过的代码.
SetFocus(this.loginForm.FindControl("UserName"));
Run Code Online (Sandbox Code Playgroud)
和
TextBox tbox = (TextBox)this.loginForm.FindControl("UserName");
if (tbox != null)
{
tbox.Focus();
} // if
Run Code Online (Sandbox Code Playgroud) 我有一个嵌套div(见下文),它有不同的CSS类,为容器提供背景颜色和文本格式
<div class="section">
<div class="sectionTitle">
<dx:ASPxLabel ID="lblSectionTitle" runat="server" Text='<%# Eval("SectionTitle") %>'></dx:ASPxLabel>
</div>
<div class="sectionTitle">
<dx:ASPxLabel ID="lblSectionDesc" runat="server" Text='<%# Eval("SectionDescription") %>'></dx:ASPxLabel>
</div>
Run Code Online (Sandbox Code Playgroud)
div部分有一个结束标记,其中有更多内容正确呈现.
上面的CSS是:
.section
{
padding: 5px;
background-color: #ffffff;
}
.sectionTitle
{
font-size: 11px;
font-family: Arial;
font-weight: bold;
color: #546fb2;
}
Run Code Online (Sandbox Code Playgroud)
当我在.section中注释掉背景颜色时,正在应用sectionTitle的格式,但是当我将背景颜色放在那里时,它会覆盖sectionTitle的颜色.我已经尝试将.section的颜色设置为匹配.sectionTitle但这仍然不起作用.
在每个浏览器(IE9不兼容,Firefox,Chrome)它工作正常,我已经看了几个小时现在这有点令人沮丧,因为我无法发现问题.
内容位于ASP.NET页面上,该页面使用具有doctype的MasterPage:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Run Code Online (Sandbox Code Playgroud)
请问有人能帮忙解决这个问题吗?
提前致谢
安迪
我们在一系列负载平衡的 Azure 应用服务中运行 Umbraco 8.1.5 网站,并且在其中一个实例中遇到了检查/Lucene 文件锁定问题。我们已尝试将Examine升级到1.0.2,但这仍然没有帮助。
据我所知,我们已遵循所有文档来设置 Umbraco 以在 Azure 应用服务负载平衡环境中运行。
有没有人在可缩放/自动缩放的 Azure 应用服务中使用 Umbraco 8 进行负载平衡?
管理 - 一个实例,无自动缩放前端 - 缩放至两个实例
在其中一台前端服务器上,我们访问外部索引的搜索控制器正在工作,但在另一个实例上,它错误地指出索引文件已锁定。下面提供了错误消息。
如果我们将前端扩展到单个实例,则搜索始终有效。
管理 web.config 应用程序设置
<add key="UmbracoServerRegistrar" value="master" />
Run Code Online (Sandbox Code Playgroud)
前端 web.config 应用程序设置
<add key="UmbracoServerRegistrar" value="slave" />
Run Code Online (Sandbox Code Playgroud)
这是在下面的作曲家中摘录的
public class ServerRegistrarComposer : IUserComposer
{
public void Compose(Composition composition)
{
var config = System.Configuration.ConfigurationManager.AppSettings["UmbracoServerRegistrar"];
if (config != null && config.Equals("slave", StringComparison.InvariantCultureIgnoreCase))
{
composition.SetServerRegistrar(new FrontEndReadOnlyServerRegistrar());
}
else
{
composition.SetServerRegistrar(new MasterServerRegistrar());
}
}
}
Run Code Online (Sandbox Code Playgroud)
注册商
public class FrontEndReadOnlyServerRegistrar …Run Code Online (Sandbox Code Playgroud)