需要从SQL DB获取记录计数以使用jquery在弹出窗口中显示行计数 [英] Need to fetch the count of records from the SQL DB to show the row count in the popup using jquery

查看:79
本文介绍了需要从SQL DB获取记录计数以使用jquery在弹出窗口中显示行计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个要求,我的SQL DB中没有行。我需要获取行计数并使用Jquery在ButtonClick事件上显示。请允许任何人指导我。



我尝试过:



需要从SQL DB中获取记录数,以便使用Jquery显示POpup中的行数

解决方案

基本上你需要一个'WebMethod'来在JQuery中处理数据库操作,使用数据类型作为'json'进行连接和返回类型。

有关详细信息,请参阅下面的代码段

从数据库中检索数据并在ASP.Net中使用jQuery AJAX在页面上显示 [ ^ ]

Hi All,
I have a requirement that, I had n no of rows in my SQL DB. I need to fetch the row count and show on "ButtonClick" Event using Jquery. Kindly can any one guide me on the same.

What I have tried:

Need to fetch the count of records from the SQL DB to show the row count in the POpup using Jquery

解决方案

basically you need a 'WebMethod' to handle database operation in JQuery, use datatype as 'json' for connection and return type.
see below snippet for more details
Retrieve data from Database and display on page using jQuery AJAX in ASP.Net[^]


这篇关于需要从SQL DB获取记录计数以使用jquery在弹出窗口中显示行计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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