I have a formview which calls a procedure "FormView1_ModeChanged" when the form mode is changed.
Since I have about 60 odd pages which could use this bit of code, I would like to know if there is a way for me to dump this piece of code in a central location like the app_code folder, and then just call this procedure from different aspx pages. Please advise.
In my aspx page, I have a formview like below:
<asp:FormView ID="FormView1" onmodechanged="FormView1_ModeChanged" >
In the code behind file, the procedure that gets called when a mode changes is:
Sub FormView1_ModeChanged(ByVal sender As Object, ByVal e As EventArgs)
If (FormView1.CurrentMode = FormViewMode.Edit) Then
PrintButton.Visible = "false"
&nbs ...
Go to the complete details ...