I allmost got it working. Can you help me in this last thing?

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

Hello,

i created an ASP.net / VB web page with Dreamweaver MX 2004.

In this page i have an Asp.Net Multipagewith 6 panels.

I added a Dreamweaver Insert Server Behavior which inserts the form values
in a database.

What happens is each time i click a "NEXT" button the form values of that
panel are inserted in a new record. So after clicking "NEXT" 5 times and
"FINISH" 1 time i get 6 records.

The problem is how Dreamweaver gives the order to insert the record:

....
<input type="hidden" name="MM_insert" value="myForm"> (1)
</form>

Well, i know i asked this before but know i finally figured out this.

What i want is to clear (1) and make it happen only when the "FINISH" button
is clicked.

I created the following code which detects if "FINISH" button was pressed. I
just don't know what should be the code to in it to have the same action as
(1)

Sub btnFinish_Click( s As Object, e As EventArgs )End Sub

It's as simple as that.

Anyway, if you want to know what "MM_insert" stands for here it is:

<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO explicador (Field1, Field2) 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" />
</Parameters>
</MM:Insert>

Thank You,
Miguel
 
N

Natty Gur

Hi,

I'm not familiar with Dreamweaver but that my suggestion.

you can attach next button click event to client side script that will
remove MM_insert field from DOM. this way MM_insert wont send with form
data and data wont be insert into DB.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top