ASP.NET AJAX在MVC3控制? [英] ASP.NET AJAX Controls in MVC3?

查看:144
本文介绍了ASP.NET AJAX在MVC3控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用ASP.NET AJAX控件在MVC3?

How would I use the ASP.NET AJAX Controls in MVC3?

例如。 屏蔽编辑框

我已经通过的NuGet安装了AJAX控件。

I've installed AJAX Control via NUGET.

和尝试添加注册标签preFIX =ASP命名空间=AjaxControlToolkit中集结号=AjaxControlToolkit中到页面的顶部。但它不被识别。

and tried adding Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" to the top of the page. but it is not recognised.

我不知道,如果它甚至有可能在MVC3,因为我从来没有使用的工具栏。它将使生活变得更容易,如果我可以使用这些工具。

And I wonder if its even possible in MVC3 since Ive Never used the toolbar. It would make life so much easier If I could use these tools.

推荐答案

任何ASP.NET服务器控件是为了用在Web表单,而不是MVC。

Any ASP.NET server control is meant to be used in Webforms, not in MVC.

您将不得不找一些其他的HTML辅助方法,这样做,或创建一个自己,这样你可以这样调用它在你的网页:

You'll have to find some other HTML helper method to do that or create one yourself so that you may call it like this in your page:

@this.Html.MaskedEditorBoxFor(m => m.WhateverProperty)

这篇关于ASP.NET AJAX在MVC3控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆