wizard and Final step

T

TdarTdar

When i click the finish button I then want it to post all the data collected
to the database to a stored procedure using a sqlcommand and executenonquery.
However during when the sub wizard1_FinishButtonClick is called it clears my
Dim'd varaibles. what gives.

code behind sample:(reduced to what is needed to show you)

Partial Class ACCOUNT_WantlistNet_Default
Inherits System.Web.UI.Page

Dim dbpostFirst As String, dbpostLast As StringHello,

Protected Sub Wizard1_NextButtonClick...
i'if wizard step finish
If Me.txtFirstName.Text = "" Then
dbpostFirst = "noname"
dbpostLast = "noname"
Else
'set value from prevous wizard step and show on finish page

dbpostFirst = Me.txtFirstName.Text.ToString
Me.lblNameValue.Text = Me.txtFirstName.Text.ToString
Me.lblNameValue.Visible = True

End If
end sub


Protected Sub Wizard1_FinishButtonClick ..

PutWantlist.CommandType = CommandType.StoredProcedure
PutWantlist.CommandText = "DJP_ACCOUNT_WANTLISTNET_PutWantlist"
PutWantlist.Connection = SqlConnection1

PutWantlist.Parameters.Add("@first", SqlDbType.NVarChar, 20).Value =
dbpostFirst.ToString ' gives me null :(

end sub

end class


So how can I do this, I figure there is something that clears the data on
finish step
causing the passed info to be invalid

Tdar
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top