使用ASP.NET Web API处理HTML控件 [英] Handling HTML controls with ASP.NET Web API

查看:62
本文介绍了使用ASP.NET Web API处理HTML控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello world,



我正在开发一个新项目,将旧的ASP.NET Web表单与AjaxPro和YUI 1.0应用程序转换为使用jQuery和Web的纯Html API。但是,我想对我的问题有一个答案,因为我没有使用Web API的经验。



在旧的Web应用程序中,我们正在处理来自代码的Web控件因此,如果您需要处理文本框控件,请检查用户已设置和显示/隐藏的选项,提供默认值或绑定默认选项。如果我删除后面的代码以删除回发并将代码移动到Web API,那么除非通过jQuery ajax调用从Web API检查选项,否则无法处理文本框。有些屏幕可能有很多控件要以相同的方式处理,我必须使用大量的Ajax调用来控制它们。这是一种正确的方法吗?



任何想法都将受到赞赏。

Hello world,

I am working on a new project that convert old ASP.NET web form with AjaxPro and YUI 1.0 application to plain Html with jQuery and Web API. However, I want to have an answer about my question since I have no experience with Web API.

In the old web application, we are handling web controls from code behind so if you need to handle a Textbox control then check the option that user already set up and show/hide , give default value, or binding default options. If I remove code behind to remove post back and move the code to web API then there is no way to handle the Textbox unless check the option from Web API via jQuery ajax call. Some screens could have a lot of controls to be handled with the same way and I have to use a lot of Ajax call to control them. Is this a proper approach?

Any ideas will be appreciated.

推荐答案

这篇关于使用ASP.NET Web API处理HTML控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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