我们想将我们的应用程序转换为客户端应用程序,但我们不知道该怎么做 [英] We want to convert our app to client side app but we don't know how we do that

查看:82
本文介绍了我们想将我们的应用程序转换为客户端应用程序,但我们不知道该怎么做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们公司的项目将成为客户端基础应用程序,但是我们的旧项目具有如此多的服务器端控制和ascx.实际上,我们希望将我们的旧应用程序转换为新的客户端应用程序.我们决定使用jquery,jquery模板和wcf服务来提供UI.我们创建了模板,并在div中使用它们.这将是很好的互动方式.但是我们不知道如何将所有的ascx,服务器端控件转换为js代码或jquery等.请问您对我们问题的建议吗?如果您在此项目中,您将如何进行转换?

最好的问候,

Unal

Hi,

Our company has project that it will be client side base application but our old project has so many server side control and ascx. Actually we want to convert our old application to new client side application. We decide to use jquery, jquery template and wcf service to feed UI. We created templates and we use them inside divs. It will be good and interactive. But we dont know how we convert all of ascx,server side control to js code or jquery etc. Could you please an advice for our issue? How would you do this conversion , if you were in this project?

Best Regards,

Unal

推荐答案

恐怕您想要的东西是不可能的.经典ASP.NET不遵循Web概念(ASP.NET MVC遵循).您在新UI中使用的实际上是网络. Ajax和控制状态彼此相距很远.两种不同的概念.没有自动转换的可能性.您必须至少重写您的表示层.
I am afraid, that what you want is not possible. Classic ASP.NET does not follow web concepts (ASP.NET MVC does). What You use in your new UI is really web. Ajax and control states are far-far away from eachother. Two different concepts. There is no automatic conversion possibility. You have to rewrite your presentation layer at least.


好吧,如果我是我,我将保留ascx文件,并使用Ajax/default.aspx通过Jquery调用它们.{name用户控制}},您可以对其进行加密和解密

我将使用一些代码在Page_init事件上呈现用户控件
Well, if i were you i will keep the ascx files and i will call them by Jquery using an ajax/default.aspx?{name of user control} " you can encrypt it and decrypt it

and i will use some code to render the user control on Page_init event


再次问候您,感谢您的快速反馈,

我们知道我们将按照您所说的那样重写表示层,但是我们有太多的服务器端控件,例如文本框,标签,按钮,网格,它们都有自己的事件,例如click,ondatabound.其实我的另一个问题应该是这个.我该如何在javascript中进行此活动? =/您能以任何方式提出建议吗?我们应该拆分一些代码并将其写入按钮事件控制器,数据网格绑定事件控制器等服务中吗?

注意:我们在项目中使用客户端MVC模型.

亲切的问候,


Unal
Hello again and thank your quick feedback,

we know that we will rewrite presentation layer as you said but we have so many server side control like textbox,label,button,grid and they have all own event like click,ondatabound. Actually my other question should be this. how may I do this event in javascript? =/ Could you please advice any way? Should we split some code and write it in service like button event controller,datagrid bound event controller etc?

Note : We use Client Side MVC Model in our project.

with kind regards,


Unal


这篇关于我们想将我们的应用程序转换为客户端应用程序,但我们不知道该怎么做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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