I have a column in a gridview on which I am trying to capture a OnDataBinding event. The following code works (without the databind):
<asp:TemplateField HeaderText="Email" SortExpression="Email">
<ItemTemplate>
<asp:Label ID="lblEmail" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
</ItemTemplate>
</<asp:TemplateField>
This does not (with the databinding):
<asp:TemplateField HeaderText="Email" SortExpression="Email">
<ItemTemplate>
<asp:Label ID="lblEmail" OnDataBinding="Email_DataBinding" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
The error is:
Error: Phonebook is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: c:\Develop\DotNetNuke_04.05.03_source\Website\DesktopModules\DNNPhonebook\ViewDNNPhonebook.ascx(27): error CS0117: 'ASP.desktopmodules_dnnphonebook_viewdnnphonebook_ascx' does not contain a definition for 'Email_DataBinding' ---> System.Web.HttpCompileException: c:\Develop\DotNetNuke_04.05.03_source\Website\DesktopModules\DNNPhonebook\ViewDNNPhonebook.ascx(27): error CS0117: 'ASP.desktopmodules_dnnphonebook_viewdnnphonebook_ascx' does not contain a definition for 'Email_DataBinding' at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---
I have a breakpoint at the beginning of my Page_Load function that never gets reached with the error and partial rendering is enabled. I would greatly appreciate any help!