locked
MultiView RRS feed

  • Question

  • User-2054142495 posted

    I have a MultiView control which consists of 3 views. Each view works as a seperate insert into table(s) within a database, working a little like the steps in a Wizard control! The first View (view1) inserts into the table and uses scope_identiity method to return the last identity value inserted into an identity column in the same scope and uses it across tables! (strQuery = "Insert into trainingTbl(s_id, t_date, EditorId, wa_id, st_id) values(@s_id , @t_date, @EditorId, @wa_id, @st_id) SET @NewTrainId = Scope_Identity()")

    The identity is then placed into a variable and the QueryString is used in each of the folllowing views!

     Dim myTrainId As String = cmd.Parameters("@NewTrainId").Value.ToString()

                ' Move to the next page where users will enter deficiecies for parts
                Response.Redirect("newRecord.aspx?NewTrainId=" & myTrainId)

    What I want to do is each time the button is clicked on the seperate view i want the data to be inserted into the chosen table and then move to the next view. This is achieved in view 2 to view 3 and view 3 to the fininishing page. However on the first view (view1) of the multiview because of the mature of the respose.redirect I cannot get the view to jump from view1 to view2 onClick()! instead it remains on view1.

    Can anybody assist me with an answer please?

    Friday, October 5, 2012 10:05 AM

All replies

  • User-1952463932 posted

    I'm not sure why you are calling Response.Redirect when you should just be able to set multiView.ActiveViewIndex++.

    Tuesday, August 30, 2016 6:02 AM