无法将数据保存到asp.net中的数据库 [英] Having trouble in saving data to database in asp.net
本文介绍了无法将数据保存到asp.net中的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我习惯于在winforms(vb.net)中工作
我们有类似的东西吗?
Me.taPic.Fill(Me.DsPic.tblPicTest)
然后保存
Hi,
I am used to working in winforms (vb.net)
Do we have something like
Me.taPic.Fill(Me.DsPic.tblPicTest)
and then to save
Dim drPic As DataRow
drPic = DsPic.tblPicTest.NewRow
drPic.Item("Picture") = vrPicHolder
DsPic.tblPicTest.Rows.Add(drPic)
taPic.Update(DsPic.tblPicTest)
我添加了数据集和tableadapter,但是我找不到代码的去向,就像我们在form_load中自动进入winfors
Me.taPic.Fill(Me.DsPic.tblPicTest)
请帮助
I added dataset and tableadapter but I could not find where the code went, like we get in winfors at form_load automatically
Me.taPic.Fill(Me.DsPic.tblPicTest)
Please help
推荐答案
在asp.NET中,您有Page-Load和Click事件(您还有很多其他事件,但这些事件似乎对您有用).单击是在按钮上单击(显而易见:)).
Page_Load :页面启动时和页面回发时.您可以只有page_Load,但是需要一个按钮来触发回发事件.
看一下以下内容:
[ ^ ]
或
^ ]
In asp.NET you have Page-Load and Click events (you have much more, but it seems that those events will be useful for you). Click is on button click (obvious:) ).
Page_Load: when page started and when page is posted back. You can have just page_Load but you need a button to trigger a post back event.
Take a look at the following:
[^]
or
Cheet Sheet[^]
这篇关于无法将数据保存到asp.net中的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文