sonicysa
asked on
redirect after multiple formview.updateitem(true)
Say that I do something like this in a button click.
protected void BtnCloseSave_Click(object sender, EventArgs e)
{
FormView4.UpdateItem(true) ;
FormView5.UpdateItem(true) ;
FormView6.UpdateItem(true) ;
FormView7.UpdateItem(true) ;
FormView8.UpdateItem(true) ;
FormView9.UpdateItem(true) ;
}
How can I--after the last formview update--redirect the user to a different page if all the updates occured?
Do I just check the ispagevalid or something or is there a more sure way to know each updated occured?
protected void BtnCloseSave_Click(object sender, EventArgs e)
{
FormView4.UpdateItem(true)
FormView5.UpdateItem(true)
FormView6.UpdateItem(true)
FormView7.UpdateItem(true)
FormView8.UpdateItem(true)
FormView9.UpdateItem(true)
}
How can I--after the last formview update--redirect the user to a different page if all the updates occured?
Do I just check the ispagevalid or something or is there a more sure way to know each updated occured?
ASKER
Are you saying there is nothing else I should be doing?
In other words if any of the formview updates fails for any reason it will never redirect correct?
In other words if any of the formview updates fails for any reason it will never redirect correct?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is this you want to do (I write it use VB.NET ) ?
Try
FormView4.UpdateItem(true)
FormView5.UpdateItem(true)
FormView6.UpdateItem(true)
FormView7.UpdateItem(true)
FormView8.UpdateItem(true)
FormView9.UpdateItem(true)
' Do your redirect
Response.redirect("myPage.
Catch ex As HttpException
MessageLabel.Text = "Some thing is wrong!"
End Try