在离线使用html5时使用asp.net数据绑定控件 [英] Working with asp.net databound controls when using html5 offline

查看:49
本文介绍了在离线使用html5时使用asp.net数据绑定控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找使我的asp.net Web表单应用程序可脱机使用的最佳方法。我的应用程序中的很多控件绑定到linqdatasource。



我是否需要将所有Linq CRUD代码隐藏和数据绑定linq查询移动到我的linq类或我应该继续检查互联网是否脱机,然后从localstorage或缓存创建一个新的数据源。我只是在了解这一点,并希望得到更多关于此事的人的指示。



谢谢

I am looking at the best way to make my asp.net web forms application be available offline. A lot of the controls in my application are bound to a linqdatasource.

Would I need to move all Linq CRUD code-behind and databound linq queries to my linq classes or should I just keep checking to see if the internet goes offline and then create a new datasource from localstorage or cache. I am just learning about this and would like some direction from those of you that know more about this.

Thanks

推荐答案

脱机工作时,从服务器获取数据的唯一真正工具是ajax,因为其他任何东西都无法处理错误处理。您冒着将HTTP 502,400,500默认响应页面作为用户体验的一部分进行渲染的风险。



您的AJAX请求没有理由无法收集任何控件的结果,包括你想要的asp.net数据绑定控件。



你需要理解使用AJAX获取HTML内容的概念。 br $> b $ b

谷歌搜索只为你! [ ^ ]
When working offline, the only real tool you have to get data from the server is ajax as anything else can''t have error handling wrapped around it. You risk the chance for HTTP 502, 400, 500 default response pages to be rendered as part of your user experience.

There''s no reason why your AJAX request can''t collect the result of any control, including your desired asp.net databound controls.

You need to understand the concept of getting HTML content using AJAX.

A google search just for you![^]


这篇关于在离线使用html5时使用asp.net数据绑定控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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