How to run this when the button is pressed?

  • Thread starter Thread starter Cor Ligthert
  • Start date Start date
C

Cor Ligthert

Hi Miquel,

This is so hard for us to answer, most of us are using compiled VB.net.

You are using aspx vb.net script. That is some different writting.
Than by most visitors in this newsgroup.

However in this newsgroup it is normal and you have all functions I
understand the only problem is how to write them right on your pages. Maybe
you can ask it in this newsgroup.

Microsoft.public.dotnet.framework.aspnet

By the way that dropdownlist sample with the dates what I made yesterday for
you was that what you needed?

Cor
 
Hello,

I am working in ASP.net / VB with Access Database.

i have a Multipage in my web site with the Submit button as the last button.

When the Submit button is pressed i want the form values to be added to a
database and sent by email.

1. I have the code which submits the form values to the database. (See at
end)

2. I have the script which sends the email using AspNetMail (See at end)

3. I have the script which detects when the Submit button is pressed:

<script runat="Server">

Sub btnSubmit_Click( s As Object, e As EventArgs )
after it send to email?
This is basicly the Big Question!

End Sub



CODE which inserts form values in database:
(I didn't test it yet but i think everything is allright.)

<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO explicador (Field1, Field2, Field3)
VALUES (?, ?, ?)" %>'
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING
_connSite") %>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABA
SETYPE_connSite") %>'
Expression='<%# Request.Form("MM_insert") = "formValues" %>'
CreateDataSet="false"
Debug="true"<Parameters>
<Parameter Name="@Field1" Value='<%# IIf((Request.Form("Field1") <>
Nothing), Request.Form("Field1"), "") %>' Type="WChar" />
<Parameter Name="@Field2" Value='<%# IIf((Request.Form("Field2") <>
Nothing), Request.Form("Field2"), "") %>' Type="WChar" />
<Parameter Name="@Field3" Value='<%# IIf((Request.Form("Field3") <>
Nothing), Request.Form("Field3"), "") %>' Type="WChar" />
</Parameters>
</MM:Insert>


Script which sends form values using AspNetEmail:

<script runat="server">

Private Sub sendEmail(sender as Object, e as System.EventArgs)

I omit the code as it to extensive but it's working as i used it many
times...

End Sub

</script>

Thank You Very Much,
Miguel
 
Back
Top