验证码重新加载和声音按钮
问题描述:
我在使用captcha进行asp.net网页时遇到了问题。 一切似乎工作正常,除了重新加载和声音按钮不应该位于验证码图像旁边,因为它们应该是。相反,它们是文本框的下方(图像波纹管)验证码重新加载和声音按钮
如何解决这个任何帮助吗?
的代码是:
<fieldset>
<legend>Registration Form</legend>
<ol>
<li class="email">
<label for="email" @if(!ModelState.IsValidField("email")){<text>class="error-label"</text>}>Email address</label>
<input type="text" id="email" name="email" value="@email" @Validation.For("email") />
@* Write any email validation errors to the page *@
@Html.ValidationMessage("email")
</li>
<li class="password">
<label for="password" @if(!ModelState.IsValidField("password")) {<text>class="error-label"</text>}>Password</label>
<input type="password" id="password" name="password" @Validation.For("password") />
@* Write any password validation errors to the page *@
@Html.ValidationMessage("password")
</li>
<li class="confirm-password">
<label for="confirmPassword" @if(!ModelState.IsValidField("confirmPassword")) {<text>class="error-label"</text>}>Confirm password</label>
<input type="password" id="confirmPassword" name="confirmPassword" @Validation.For("confirmPassword") />
@* Write any password validation errors to the page *@
@Html.ValidationMessage("confirmPassword")
</li>
<li class="recaptcha">
@Html.Label("Retype the code from the picture:", "CaptchaCode")
<p></p>
@{
Captcha exampleCaptcha = new Captcha("ExampleCaptcha");
exampleCaptcha.CodeLength = 4;
exampleCaptcha.ImageSize = new System.Drawing.Size(240, 70);
exampleCaptcha.UseHorizontalIcons = true;
exampleCaptcha.UserInputID = "CaptchaCode";
exampleCaptcha.AdditionalCssClasses = "class1 class2 class3";
}
@Html.Raw(exampleCaptcha.Html)
@Html.TextBox("CaptchaCode")
</li>
</ol>
<input type="submit" value="Register" />
</fieldset>
感谢, 迪尼斯
答
好的球员,问题解决了!
我忘了添加下面的行头部分:
<link href="@BotDetect.Web.CaptchaUrls.Absolute.LayoutStyleSheetUrl" rel="stylesheet" type="text/css" />
哪里是你的代码。 ? – Ravikumar
对不起,只是在原帖中发布了代码。 – D1N15