Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

exception when updating a Formview within WizardControl

Posted on 2011-09-12
2
Medium Priority
?
246 Views
Last Modified: 2012-05-12
i have a wizard control , i tried to put all the insert command and update commands withing the ( Next , Previous ) buttons of the wizard , the code i use is :

Protected Sub Wizard1_PreviousButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.PreviousButtonClick
        Select Case e.CurrentStepIndex
            Case 2
                Select Case FormView2.CurrentMode
                    Case FormViewMode.Insert
                        FormView2.InsertItem(True)


                    Case FormViewMode.Edit
                        FormView2.UpdateItem(True)

                End Select


        End Select
    End Sub


when i test this code , i get the following error

Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control that has CausesValidation=True and initiated the postback, or after a call to Page.Validate.


any help on this issue ?
0
Comment
Question by:nasemabdullaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 1500 total points
ID: 36527826
Control validation has to be done. If it is valid then Page.Validate() should be called in your method. Please check the link:  http://forums.asp.net/t/1106963.aspx/1
0
 

Author Closing Comment

by:nasemabdullaa
ID: 36711684
its working now
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question