Public
Inherits MicroFour.StrataFrame.UI.Web.TextBox
.
End
Will it cause any errors when i try to add, update or delete record?
Also, if you need to create your own controls that are bindable to business objects in the framework, you only need to implement the IWebBusinessBindable interface on your control and use the source code for the TextBox or any of the other controls to see how to implement it (type editor attributes, extra code, etc.).
Will it affect the original behavior of strataframe control? Does Strataframe add any code in event functions? Is there any better way to do it? Does Strataframe provide any hook method like before display, after display?
The data is copied through the binding to the control on the Page.PreRender event and the data is copied back from the control on a PostBack through the Page.PreLoad event. So, after the PreRender event, the controls will be populated with the appropriate values for the binding, and successfully modify the value by altering the control after the Page.PreRender event. Same thing goes for the Page.PreLoad event for copying data back from the control.
2. What will happen if I add code in Page.PreLoad and Page.PreRender event? If error may occur, what I should do to prevent the error?
3. Page.Load and Page.PreRenderComplete are the safe places for me to add some codes?
That is correct.
You could add code there. You should handle errors just like any other errors that appear within an ASP.NET page, including the custom error pages if necessary.
Correct, those are the safest places to add code.
Protected
Now, if you attach to an event, then there is no base or DODEFAULT that you need to call; it will be done automatically. In fact, there is no way to prevent the base methods from firing. Only on method overrides do you need to call the base method.