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