Re: Submit Button
- From: "Chris" <Chris@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 05:28:19 -0800
Bob, I basically have created a web form page that will be accessed via the
web. It is a simple form with a SQL database that has related fields.
Basically my submit button is for when the user fills in the information,
they hit the submit button so the information they have added to the form
gets inserted into the database.
I am just stuck on what the code needs to look like for the Submit button.
Thanks, Chris A
"Bob Barrows [MVP]" wrote:
> SqlDataAdapter and SqlConnection are ADO.Net objects.Since you mentioned a
> Submit button, I assumed you were using either Visual Studio 2003 or 2005 to
> create an ASP.Net project. I assume the page you are creating has a .aspx
> extension ...
>
> You almost answered your own question when you said you were "coding in VB":
> VB <> vbscript.
> http://msdn.microsoft.com/library/en-us/script56/html/f8d34ff7-56dc-4a6e-b500-a1fbdc309e10.asp
>
> Incidently, I was not saying that this was .asp code: .asp is classic asp,
> and has only a passing resemblance to ASP.Net.
>
> Oh wait: maybe I'm reading too much into that "Submit" word. Are you
> creating a Windows form? If so, the group you should be posting to is:
> microsoft.public.dotnet.framework.windowsforms
>
> In either case, the questions you are asking have nothing to do with
> vbscript.
>
> Bob Barrows
> Chris wrote:
> > Thanks Bob, but why is this considered .asp code when I am coding in
> > VB?
> >
> > CA
> >
> > "Bob Barrows [MVP]" wrote:
> >
> >> Chris wrote:
> >>> I have created a form with many inout boxes, all input boxes have
> >>> unique names. I have a SQL database with just a few entries which
> >>> relate to the form. I have a submit button on the form and I am
> >>> trying to code that button to add the data entered on the form into
> >>> the database.
> >>>
> >>> I have a SqlDataAdapter, SqlConnection to my form. Can someone
> >>> please help me with my code for the submit button? I believe I need
> >>> an Insert statement.
> >>>
> >> You are in the wrong place. This is an asp.net question, not a
> >> vbscript question. You should be posting to
> >> microsoft.public.dotnet.framework.aspnet.
> >>
> >> Ignore all the advice about the javascript client-side code. You
> >> need to add code to the server-side event-handler for your submit
> >> button. Go to your code-behind page if you are using one, select
> >> your submit button from the dropdown list at the top left. Then
> >> select the Click event from the dropdown list at the top right. It
> >> should create an event-handler sub for you in which you will write
> >> the code to create your insert statement.
> >> Without more details, this is as far as i can take you. Please
> >> follow up in the aspnet group, providing details about your database
> >> table and the controls on the page.
> >>
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get
> >> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>
.
- References:
- Re: Submit Button
- From: Bob Barrows [MVP]
- Re: Submit Button
- From: Bob Barrows [MVP]
- Re: Submit Button
- Prev by Date: Re: how to script a check for computer existence
- Next by Date: VB WMI script syntax
- Previous by thread: Re: Submit Button
- Next by thread: text question
- Index(es):
Loading