开发者

save to sql server database from client side

I have a gridview with dropdownlist in it. When the user changes the item in the dropdownlist I want to save the new item in the database. I want this to happen using javascript and ajax like effect.

I know how to access the dropdownlist inside gridview using javascript and I can get the new selectd item.

How can I save i开发者_开发知识库t to database without server side code? I know one way of doing this is using web services. I just want to know if there is/are any other ways to do it.


I don't think there is a way for client side script to interact with DB. If you are using ASP .Net there are only three ways you can achieve this:

using a .aspx page

using a .ashx (http handler) or

using a .asmx (web service)

The way you can achieve an AJAX call is to use XMLHttpRequest object.

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜