如何将标签中的数据存储到数据库中 [英] How to store data from label into the database

查看:452
本文介绍了如何将标签中的数据存储到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ħ!


我创建了asp.net C#应用程序,它接受学生标记并计算总数,平均值和成绩字母,并在数据库中插入输入的标记。使用文本框输入标记。计算出的标记和等级显示在标签上。我希望这些总数和成绩也存储在数据库中。我有标签中总数,平均值和总成绩的列。

如何将标签上显示的数据存储到标签中?



谢谢你的帮助。

H!
I have created asp.net C# application that accepts student marks and calculate the totals,average and grade letters and insert the entered marks in the db. the marks are entered using text boxes. The computed marks and grades are displayed on labels. i want these totals and grades to be stored in the db as well. i have the columns for totals, average and overal grade in the label.
How can i store the data displayed on the labels into the labels?

Thank you for your help.

推荐答案

我更喜欢,



拳头开始给予标签名称与字段名称相同。

Ex。您的字段名称是StudName,而不是标签名称应该是lblstudname,这里lbl用于标识标签控制器。



现在有一个名为Text的标签属性;这将有助于您获取标签数据。

Ex。 lblstudname.Text这将返回学生姓名



将其存储在数据库中。
I prefer that,

Fist start giving the name of the label same as field name.
Ex. your field name is StudName than label name should be lblstudname here lbl is use for identify label controller.

Now There is property of label named as Text; this will help you for fetching data of label.
Ex. lblstudname.Text this will return student name

Store it in database.


LabelID.Text具有您要查找的值。请考虑根据您的表格列更改数据类型。
LabelID.Text has the value you are looking for . Consider changing the data-types as per you table column.


这篇关于如何将标签中的数据存储到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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