HTML表,如何保存与警报框? [英] html table, how to save with alertbox ?

查看:88
本文介绍了HTML表,如何保存与警报框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个5行的表.

首先,我将输入第一行的字段,然后保存.单击保存后,我应该会收到一个警告框,例如您的详细信息已用etc"id"(某些ID)保存.每次单击保存按钮时,该ID均应不同.

I have a table with 5 rows.

At first instance, I will enter the fields of 1st row and then save. On save click, I should get an alert box like your details has been saved with etc "id" (Some id). That id should be different on every save button click. How should I display that message in the alert box along with the id?

推荐答案

为此,您需要执行以下步骤.

1.首先将数据保存到数据库中,并获取插入到表中的行的主键(某些ID,要在警报框中显示).

2.然后编写代码,以在后面的代码中显示一个警告框,并显示该主键值.为此,您可以检查 JavaScript: ASP.NET代码隐藏 [ ^ ],其中RegisterClientScriptBlock用于显示后面代码中的一个警报框.

尝试实施这些步骤,然后返回一些代码和查询(如果有的话).

谢谢...
编码愉快. :)
For this, you need to work out the following steps.

1. First save data into the database and get the primary key (some ID, which you want to show on alert box) value of the row inserted into the table.

2. Then write codes to show an alert box from code behind and display that primary key value. For this you can check JavaScript: Alert.Show("message") from ASP.NET code-behind[^], in which RegisterClientScriptBlock is used to show one alert box from code behind.

Try to implement these steps and come back with some codes and queries, if any.

Thanks...
Happy Coding. :)


这篇关于HTML表,如何保存与警报框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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