如何使用javascript将sqlserver数据绑定到asp.net控件 [英] how to bind sqlserver data to asp.net controls using javascript

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

问题描述

如何使用javascript

how to bind sqlserver data to asp.net controls using javascript

推荐答案

绑定sqlserver数据到asp.net控件?您是否尝试过使用AJAX在后台调用另一个页面?

我可能会用这种方式解决.

假设您要第1页上的数据.您可以通过AJAX在后台调用page2,而所有page2要做的就是连接到数据库并获取所需的数据,并将其返回给page1的调用方.完成后,您现在可以通过控件的ID将数据分配给控件.

只需仔细检查浏览器中的源即可.当页面已经加载到浏览器中时,asp.net控件ID可能会不同.

我不确定,因为您对要做什么做了简短的描述,但我希望这对您有所帮助. :)
have you tried using AJAX to call another page in background?

i''ll probably solve it this way.

let''s say you want those data on page1. you can call page2 in background through AJAX and all page2 has to do is connect to the database and fetch the data you need and return it to the caller at page1. Once done you can now assign the data to the controls through their ids.

just double check the source in the browser. asp.net control ids may not be the same when the page is already loaded in the browser.

i can''t be really sure because you have quite a short description of what you want to do but i hope this helps a bit. :)


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

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