C# 在 ASP.NET 中使用 Ext JS

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/205720/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 17:59:28  来源:igfitidea点击:

Using Ext JS in ASP.NET

c#asp.netvb.netextjs

提问by

I don't have advanced knowledge in JavaScript, and I am trying to learn how to use Ext JS framework in ASP.NET (C# or VB.NET) environment. I've got couple of samples, but was unable get the project working. Is there such as website or book so I can go a read up about Ext JS in more details and how can I include this into my website?

我没有 JavaScript 的高级知识,我正在尝试学习如何在 ASP.NET(C# 或 VB.NET)环境中使用 Ext JS 框架。我有几个样本,但无法使项目正常工作。是否有网站或书籍之类的,以便我可以更详细地阅读有关 Ext JS 的信息,以及如何将其包含在我的网站中?

回答by Joel Coehoorn

Any particular reason you've settled on Ext JS out of all the different frameworks out there? If not, since you're using ASP.NET I recommend jQuery instead as it's going to be officially supported by Microsoft soon.

您在所有不同的框架中选择 Ext JS 有什么特别的原因吗?如果没有,由于您使用的是 ASP.NET,我建议改用 jQuery,因为它很快就会得到 Microsoft 的正式支持。

回答by Adam Caviness

I suppose you've been all through the samples at Sencha

我想你已经完成了Sencha 的所有样品

You really need to read this entire post Secrets of the JavaScript Ninjas(2008-08-13) to decide if Ext JS is a better choice.

您真的需要阅读整篇文章Secrets of the JavaScript Ninjas(2008-08-13) 来决定 Ext JS 是否是更好的选择。

If you decide to stick with Ext JS , you may find Ext JS Extender Controlsuseful.

如果您决定坚持使用 Ext JS ,您可能会发现Ext JS Extender Controls很有用。

回答by Jason Watts

Mike,

麦克风,

The best example site out there is http://examples.extjs.eu/. Each example has a link for viewing HTML, javascript and CSS separately.

最好的示例站点是http://examples.extjs.eu/。每个示例都有一个链接,用于分别查看 HTML、javascript 和 CSS。

We are successfully integrating ExtJS with the ASP.NET MVC framework. A separate post detailing how to put everything together is probably in order.

我们正在成功地将 ExtJS 与 ASP.NET MVC 框架集成。一个单独的帖子详细说明如何把所有东西放在一起可能是有序的。

回答by Alan

When I was learning to incorporate Ext JS with ASP.NET at my previous position, I found the best way to learn it (aside from the documentation and examples) was just going thru the forums and picking up up sample code here and there from user posts.

当我在之前的职位上学习将 Ext JS 与 ASP.NET 结合时,我发现学习它的最好方法(除了文档和示例)就是浏览论坛并从用户那里获取示例代码职位。

Once you've learned the nuances of the client API (and their online documentation and forums have been excellent in this regard), it's then just a simple matter of having your ASP.NET code returning the correct JSON for Ext JS to consume.

一旦您了解了客户端 API 的细微差别(并且他们的在线文档和论坛在这方面非常出色),那么让您的 ASP.NET 代码返回正确的 JSON 以供 Ext JS 使用就很简单了。

I have a rather outdated ASP.NET MVC / Ext JS sample project that probably won't compile anymore (it was built with an early preview release of MVC) but you can probably still go thru the code to see how Ext JS interacts with the server side code.

我有一个相当过时的 ASP.NET MVC / Ext JS 示例项目,它可能不会再编译(它是用 MVC 的早期预览版本构建的),但您可能仍然可以通过代码查看 Ext JS 如何与服务器端代码。

Ext JS and ASP.NET MVC Sample Project

Ext JS 和 ASP.NET MVC 示例项目

回答by iasksillyquestions

Take a look at the Script# project. It, at build time, generates JavaScript from your C# and is particularly good for writing desktop-like applications.

查看Script#项目。它在构建时从 C# 生成 JavaScript,特别适合编写类似桌面的应用程序。

回答by Ates Goral

Also see http://www.coolite.com/(Just providing the link and in no way endorsing it, as I haven't really seen it in action.)

另请参阅http://www.coolite.com/(仅提供链接,绝不支持它,因为我还没有真正看到它的实际效果。)

回答by Ates Goral

i wrote a poston using extjs grid with asp.net mvc. although you are not planning to use ext on mvc fm. i think other details like how to render it using javascript, parsing parameters in requests sent by the grid, json serialization...etc will be relavant and helpful to you.

我写了一篇关于在 asp.net mvc 中使用 extjs 网格的帖子。尽管您不打算在 mvc fm 上使用 ext。我认为其他细节,例如如何使用 javascript 呈现它,解析网格发送的请求中的参数,json 序列化...等将对您有所帮助。

回答by Robert Koritnik

I worked on a project that was using ExtJS heavily. I don't really know what king of problems do you actually have but we used a great combination of ExtJS, Asp.net, WCF for ExtJS Ajax calls to the server. Worked like a charm. But we abandoned the regular asp.net control usage almost completely, because most of the UI was build in ExtJS. We also used our own layout and controls with a different look and feel than ExtJS. So it didn't really look like an ExtJS app.

我参与了一个大量使用 ExtJS 的项目。我真的不知道你实际上有什么问题之王,但我们对服务器的 ExtJS Ajax 调用使用了 ExtJS、Asp.net、WCF 的完美组合。像魅力一样工作。但是我们几乎完全放弃了常规的 asp.net 控件使用,因为大部分 UI 是在 ExtJS 中构建的。我们还使用了我们自己的布局和控件,其外观和感觉与 ExtJS 不同。所以它看起来并不像一个 ExtJS 应用程序。

You could get by with regular WebMethods (as in Web Services) as well.

您也可以使用常规的 WebMethods(如在 Web 服务中)。

You will definitelly benefit a lot by using tools like Firebugand Fiddlerto debug your javascript code and to examine all messages going back and forth between client and server.

通过使用FirebugFiddler 之类的工具来调试 javascript 代码并检查在客户端和服务器之间来回传递的所有消息,您肯定会受益匪浅。

Getting examples is better and better every day, since more and more people are using ExtJS in combination with various technologies. Asp.net as well.

获取示例每天都越来越好,因为越来越多的人将 ExtJS 与各种技术结合使用。Asp.net 也是如此。

回答by Robert Koritnik

The best ASP.Net MVC Tag Library for the popular ExtJS framework. Website:http://www.mvcnext.com

流行的 ExtJS 框架的最佳 ASP.Net MVC 标记库。网址:http: //www.mvcnext.com

MVCnExt simplifies ExtJs for ASP.Net MVC.

MVCnExt 为 ASP.Net MVC 简化了 ExtJs。

Makes it easier for to integrate ExtJs compoments for ASP.Net MVC.

使为 ASP.Net MVC 集成 ExtJs 组件变得更容易。

回答by Robert Koritnik