|
 |
aspx thread: How to submit a form?
Message #1 by "Mel C Solomon" <melsolomon@e...> on Mon, 3 Jan 2000 12:46:48 -0800
|
|
I'm working on asp.net and I want to ask some help from all of you.
Any body knows how to submit a form ? and save the form value ( the
TextBox, List Box,etc) in to database?
Thanks!
__________________________________
www.edsamail.com
Message #2 by John Pirkey <mailjohnny101@y...> on Mon, 26 Feb 2001 07:54:46 -0800 (PST)
|
|
Well, your question has multiple parts. First off, there are multiple ways of
submitting the form now. You can still have a command button do it, by setting it's
OnClick event to run a query that gathers this information. You can also do it by
setting one of the form elements's AutoPostBack property to True and then writing
code in their "event" procedure to do it. I generally still use a command button.
I also use ALL asp controls (<asp:textbox ...> <asp:ListBox ...>, etc). This way,
in my button's click code - i can reference those controls, by name and not have to
use the request.form collection to get their values.
once you have these values, use whatever data access methods you want to insert them
into a database. I've been using ADO.Net, but that's mostly because i'm too lazy to
run the .Net tlb exe generator on "legacy" ado to use it with ASP.Net.
Have to plug a great book here - Check out Wrox's A Preview of Active Server Pages
+. I've learned A LOT from that book (and i'm only on chapter 4!).
Hope this helps,
John
--- Mel C Solomon <melsolomon@e...> wrote:
> I'm working on asp.net and I want to ask some help from all of you.
> Any body knows how to submit a form ? and save the form value ( the
> TextBox, List Box,etc) in to database?
>
> Thanks!
>
> __________________________________
> www.edsamail.com
>
=====
----------------------------
John Pirkey
MCSD
John@S...
http://www.stlvbug.org
Message #3 by "Mel C Solomon" <melsolomon@e...> on Wed, 28 Feb 2001 12:30:20 -0800
|
|
Thank's! Could you please send the proper code? Let say I have a .mdb table
and want to move the gathered data to it.I'm using ADO.Net and want to
collect forms value over command button.
ASP+ wrote:
>Well, your question has multiple parts. First off, there are multiple ways of
>submitting the form now. You can still have a command button do it, by setting it's
>OnClick event to run a query that gathers this information. You can also do it by
>setting one of the form elements's AutoPostBack property to True and then writing
>code in their "event" procedure to do it. I generally still use a command button.
>I also use ALL asp controls (<asp:textbox ...> <asp:ListBox ...>, etc). This way,
>in my button's click code - i can reference those controls, by name and not have to
>use the request.form collection to get their values.
>
>once you have these values, use whatever data access methods you want to insert them
>into a database. I've been using ADO.Net, but that's mostly because i'm too lazy to
>run the .Net tlb exe generator on "legacy" ado to use it with ASP.Net.
>
>Have to plug a great book here - Check out Wrox's A Preview of Active Server Pages
>+. I've learned A LOT from that book (and i'm only on chapter 4!).
>
>Hope this helps,
>
>John
>
>--- Mel C Solomon <melsolomon@e...> wrote:
>> I'm working on asp.net and I want to ask some help from all of you.
>> Any body knows how to submit a form ? and save the form value ( the
>> TextBox, List Box,etc) in to database?
>>
>> Thanks!
>>
>> __________________________________
>> www.edsamail.com
>>
>
>=====
>
>----------------------------
>John Pirkey
>MCSD
>John@S...
>http://www.stlvbug.org
>
Message #4 by John Pirkey <mailjohnny101@y...> on Tue, 27 Feb 2001 07:10:39 -0800 (PST)
|
|
it's too much code to post here, but if you visit http://www.wrox.com/beta and then
download the sample code from the ASP+ book - it has lots of this sort of stuff.
look around in chapter 3's code.
good luck,
john
--- Mel C Solomon <melsolomon@e...> wrote:
> Thank's! Could you please send the proper code? Let say I have a .mdb table
> and want to move the gathered data to it.I'm using ADO.Net and want to
> collect forms value over command button.
>
>
> ASP+ wrote:
>
> >Well, your question has multiple parts. First off, there are multiple ways of
> >submitting the form now. You can still have a command button do it, by setting
> it's
> >OnClick event to run a query that gathers this information. You can also do it
> by
> >setting one of the form elements's AutoPostBack property to True and then writing
> >code in their "event" procedure to do it. I generally still use a command
> button.
> >I also use ALL asp controls (<asp:textbox ...> <asp:ListBox ...>, etc). This
> way,
> >in my button's click code - i can reference those controls, by name and not have
> to
> >use the request.form collection to get their values.
> >
> >once you have these values, use whatever data access methods you want to insert
> them
> >into a database. I've been using ADO.Net, but that's mostly because i'm too lazy
> to
> >run the .Net tlb exe generator on "legacy" ado to use it with ASP.Net.
> >
> >Have to plug a great book here - Check out Wrox's A Preview of Active Server
> Pages
> >+. I've learned A LOT from that book (and i'm only on chapter 4!).
> >
> >Hope this helps,
> >
> >John
> >
> >--- Mel C Solomon <melsolomon@e...> wrote:
> >> I'm working on asp.net and I want to ask some help from all of you.
> >> Any body knows how to submit a form ? and save the form value ( the
> >> TextBox, List Box,etc) in to database?
> >>
> >> Thanks!
> >>
> >> __________________________________
> >> www.edsamail.com
> >>
> >
> >=====
> >
> >----------------------------
> >John Pirkey
> >MCSD
> >John@S...
> >http://www.stlvbug.org
> >
|
|
 |