将数据保存在一个asp.net Webform的两个不同表中 [英] Save data in two different tables from one asp.net Webform

查看:196
本文介绍了将数据保存在一个asp.net Webform的两个不同表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello FRNDS !!



我在Asp.net,C#,SqlServer 2005上工作。



我的Asp.net网页上有调查表...在这里,我总共有15个带有单选按钮选项和提交按钮的问题。



所以,在此15个问题....最后2个问题用于输入评论(我在这里使用文本框最后2个问题来输入评论)





在SqlServer 2005数据库中,我有两个带名字的表

1)SurveyAnswers(表1)

2)评论(表2)





所以,我的要求是我想保存用户在评论表中输入的最后2条评论数据。并且左边的答案必须保存在调查答案表中。



我想在两个不同的表格中保存数据。





请帮助,



先谢谢。

Hello FRNDS !!

Am working on Asp.net, C# , SqlServer 2005.

I have Survey Form on my Asp.net Webpage...In this I have total 15 Questions with Radio Button Options and a submit button.

So, In this 15 Questions.... Last 2 Questions are used for entering Comments (I used Textboxes here for last 2 questions to enter the comments)


In SqlServer 2005 Database, I have Two Tables with Name
1)SurveyAnswers (Table1)
2)Comments (Table2)


So, my requirement is i want to save last 2 comments data entered by user in Comments table. and the left over answers must be saved in Survey Answers Table.

I WANT TO SAVE THE DATA IN TWO DIFFERENT TABLES.


Please help,

Thanks in Advance.

推荐答案

按照你的要求点击两个查询,否则Graus说,你也可以这样做......你在哪里停留?
Fire two queries as per your requirements or else as Graus said, you can do that as well... Where are you stuck at ??


这是微不足道的。您调用存储过程将数据存储在所需的表中。问题在哪里?
This is trivial. You call a stored proc that stores the data in the tables you want. Where is the issue ?


这篇关于将数据保存在一个asp.net Webform的两个不同表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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