插入记录表单asp.net页面 [英] inserting records form asp.net page

查看:78
本文介绍了插入记录表单asp.net页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从asp.net Web表单中的文本框中访问值并将其保存回MS Access中的数据库.我是asp.net的新手.因此,请适当解释.预先感谢

how to access the values from a text box in an asp.net web form and save it back to an database in MS access. Im new to asp.net. So please explain suitably. Thanks in advance

推荐答案

好吧,它涉及两个主要方面:连接字符串的形成和建立.如何与DB&保存数据.

以下材料将帮助您:
对于连接字符串:连接字符串 [ ^ ]!

对于数据通信:
使用ADO.NET访问数据 [通过C#访问SQL Server的入门指南 [ ^ ]

尝试!
Okay, there are two major things involved in it: Connection String formation & How to talk to DB & save data.

Following material would help you out:
For connection string: Connection String[^]!

For data communication:
Accessing data with ADO.NET[^]
Beginners guide to accessing SQL Server through C#[^]

Try!


感谢所有抽出宝贵时间回答我的人.我终于让它工作了,这非常简单.首先,在C#代码中不知道d个文本框.我右键单击每个文本框,然后单击查看代码,这将打开c#代码页.在那里,我使用了d语法
Thanks for all who spared their precious time in answering me. I finally had it working and it was very simple. At first d textboxes are not known inside the c# code. i right clicked each text box and clicked view code which opens the c# code page. there i used d syntax
txtboxname.Text;

stmt来检索它,并使用了查询插入表名值(" + txtboxname.Text +''....). ;完成插入..并且效果很好.

stmt to retrive it and used the query "Insert into tablename values (''"+txtboxname.Text+"''....);" to accomplish the insertion.. and it worked fine.


这篇关于插入记录表单asp.net页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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