Help Needed for Going Back to Previous page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adarshyam
    New Member
    • Oct 2008
    • 31

    Help Needed for Going Back to Previous page

    friends,
    i have a problem in going back to previous page in my application.. since i want that to happen in the if else statement i cannot incorporate JS. please help me .. i am trying this for very long tym.. the reason s i am using dynamic textboxes in multiview,..and i wanna validate them b4 changing view.. here s piece of my code..please teme whr can i place code to go to prev step of the step in the page and what ll be the code..


    Code:
        
                                        For count = 0 To textbox1.text
                                            wtsum += CDec(dynamictxtbox(count).Text)
                                        Next
                                  If wtsum = 1 Then
                                        do the calculations 
                                      MultiView1.SetActiveView(View4)
                                    else                          
                                        MsgBox("error")
     ' i want code which must goto previous step after user clicks on ok in msgbox
                                  end if

    please help me .. im struggling with this for few days to get a solution
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Actually you can use JS, try register client script.

    Comment

    • adarshyam
      New Member
      • Oct 2008
      • 31

      #3
      Originally posted by kenobewan
      Actually you can use JS, try register client script.
      please help me out with this im kinda lost.. this s the last step in my application.. how to register client script. . and what will be the code and should i place it in button in the same place i marked or somewhr else.. i used

      Code:
      Button13.Attributes.Add("OnClick", "javascript:history.go(-1)")
      in the else part after the msgbox but its not going one step back.. pls teme what should i try..

      Comment

      • adarshyam
        New Member
        • Oct 2008
        • 31

        #4
        thank u very much for ur reply.. i googled bot registering client script and got the solution.. m happy tat my application s completed n works well :) the code i used to go 1 step back in that page is

        Code:
        Page.RegisterStartupScript("goBack", "<script type=""text/javascript"" language=""javascript"">window.history.go(-1);</script>")
        my 1st successful proj. thanks everybody 4helpin me for my questions

        Comment

        Working...