wizard and Final step

Discussion in 'ASP .Net Web Controls' started by TdarTdar, Aug 14, 2007.

  1. TdarTdar

    TdarTdar Guest

    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
    TdarTdar, Aug 14, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jaap de verwant slachter
    Replies:
    0
    Views:
    1,238
    jaap de verwant slachter
    Jul 1, 2003
  2. Roy in

    need step by step example

    Roy in, Aug 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    336
    Roy in
    Aug 3, 2003
  3. Steve Richter

    a step by step page

    Steve Richter, May 3, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    360
    Steve Richter
    May 3, 2005
  4. craig dicker
    Replies:
    1
    Views:
    334
    Peter Rilling
    Jul 10, 2005
  5. David Thielen

    3 step wizard - ignore last step

    David Thielen, Oct 23, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    221
    Steven Cheng[MSFT]
    Oct 24, 2006
Loading...

Share This Page