来自文本框的数据将保存在数据库中,并同时显示在网格视图中 [英] data from text box get saved in database and get display in grid view at the same time

查看:72
本文介绍了来自文本框的数据将保存在数据库中,并同时显示在网格视图中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.

我正在做一个项目,我需要从SQL Server中的多行文本框中保存数据,并同时在GridView中检索和显示数据.两者都在同一个网页中.就像我们在这里提交问题一样,单击提交按钮后,问题就会立即显示出来.请帮助我理解此处应用的概念.

Hello.

I am doing a project in which I need to save data from a multi-line text box in SQL Server and retrieve and display the data in a GridView at the same time. Both are in a same web page. Like we submit our Question here and it get displayed as soon as we click the submit Button. Please help me to understand the concept applying here.

推荐答案

当您单击提交"按钮时,该表单将发回到服务器上.在服务器上的后面代码中,您需要将数据添加到数据库,然后在表单上的asp webcontrol上设置相同的值,以便当响应返回到客户端时,该值将按您希望的方式显示
When you hit the submit button, the form will post back to the server. In the code behind on the server you will need to add the data to the database and then set the same value to an asp webcontrol on the form so that when the response goes back to the client, the value will be displayed as you want it to be.



您将从下面的帖子中获得更具体的代码示例
http://www.daniweb.com/forums/thread288283.html [ http://forums.asp.net/t/1035320.aspx [
Hi,
You will get more specific code example from posts below
http://www.daniweb.com/forums/thread288283.html[^]
and
http://forums.asp.net/t/1035320.aspx[^]

Hope this will solve your issue.


这篇关于来自文本框的数据将保存在数据库中,并同时显示在网格视图中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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