计算每个Buton点击以在asp.net C#中将值存储到数据库 [英] Count every Buton clicks to store values to database in asp.net C#

查看:64
本文介绍了计算每个Buton点击以在asp.net C#中将值存储到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

计算每次Buton点击以将值存储到asp.net中的数据库C#

Count every Buton clicks to store values to database in asp.net C#

推荐答案

引用:

我在网页上自动输入是/否。当我clik是,这个商店到数据库。

。当我clik NO,这也存储到数据库

autually i put yes/no in web page.when i clik yes,this store to database.
.when i clik NO,this also store to database

然后在该列中存储是或否。无需点击鼠标。

Then store "Yes" or "No" in that Column. No need to put mouse clicks there.


您将在数据库中拥有Yes和No count列。点击按钮时,只需点击下面提到的更新查询表。



You would be having Yes and No count columns in database.. on click of button just hit the table with below mentioned Update Query.

If (@ButtonType == 'Y')
begin
    select @Count = Max(YesCountColumn) from Table
    update table 
    set YesCountColumn = @count + 1
end
else
    select @Count = Max(NoCountColumn) from Table
    update table 
    set NoCountColumn = @count + 1
begin
end



请告诉我你的餐桌结构..所以我可以更好地给你解决方案..我按照下表结构构建查询

创建表格表(YesCountColumn int,NoCountColumn int)


Please tell me your table structure.. So that I can better give you solution.. I have build query as per below table structure
Create Table table(YesCountColumn int, NoCountColumn int)


如果您计划捕获用户活动

log。在每个按钮上调用以下方法点击()事件



无效更新(字符串src)

{



//插入表(列)值(src)

}
if you are planning to catch user activities
log. call below method on every button click() event

void updated(string src)
{

//insert into table(column) values(src)
}


这篇关于计算每个Buton点击以在asp.net C#中将值存储到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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