Re: Submit Button

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
>
>
>
.



Relevant Pages

  • Re: Thanks for all the replies folks, a few more questions...
    ... bigget issue in this newsgroup has always been about that same freedom. ... sending bogus complaints to the BBB, ... Kindly point to one posting that was anti-DIY. ... Bob on every subject for years, all because Bob refuses to attack yours ...
    (alt.security.alarms)
  • Re: MS Access - problem with Double type field
    ... This is a multipost, not a crosspost. ... > know what the form is posting, and subsequently what the database has ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Exposing stalkers
    ... Pat Gardiner ... You had been quoting the ridom database for several years before being found ... I found this newsgroup at the end of August and attempted to contribute by adding to what Mr Gardiner was posting, including references about which he appeared to be ignorant - though I was surprised at this because anyone with his interests would surely have been monitoring the most relevant journals as well as, or better still instead of, the mostly media reports that he appears to rely on. ...
    (uk.business.agriculture)
  • Re: Companyweb Error after restore..
    ... This newsgroup only focuses on SBS technical issues. ... you may want to contact Microsoft CSS directly. ... This posting is provided "AS IS" with no warranties, ... Unable to connect to the database STS_CRSISERVER01_1 on ...
    (microsoft.public.windows.server.sbs)
  • Re: MS Access SQL > ASP SQL problem....
    ... Unless your database is protected by workgroup ... NOT supply a username and password in the connection string or in the open ... Bob Barrows ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)