Thanks, Sam. I found that the problem lies in the fact that my bind statements are actually contained in separate user controls (I know, I should have disclosed that fact but I wanted to simplify), and these user controls aren't binding. I know this is true because when I pasted the content of my user controls back into the aspx page, they worked (bound and displayed the data correctly).
In other words, the user control is called thusly from the aspx page:
Code:
<Prf:email ID="EmailE" runat="server" />
The user control is pretty standard stuff but doesn't bind when it's in its separate ascx page:
Code:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="email.ascx.vb" Inherits="userControls_profile_email" %>
<asp:Panel ID="pnlEmail" Visible="true" runat="server">
<div class="label">
<asp:Label ID="lblEmail" Text="E-mail:" runat="server" />
</div>
<div class="ctrl">
<asp:TextBox ID="Email" CausesValidation="true" EnableViewState="False" Font-Bold="false"
Text='<%#Bind("Email")%>' BackColor="#FFFFFF" Enabled="true" TabIndex="50" runat="server" />
</div>
<div class="req">
<asp:Label ID="lblEmail_Req" Text="*" ForeColor="#FF0000" runat="server" />
</div>
<asp:UpdatePanel ID="udpDisEmail" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="disp">
<asp:CheckBox ID="chkEmail" AutoPostBack="true" Checked='<%#Bind("Email_Disp") %>'
Enabled="true" TabIndex="500" Text="Display?" TextAlign="left" runat="server" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<asp:Panel ID="pnlEmailVal" Visible="true" runat="server">
<div class="valid-container">
<asp:RequiredFieldValidator ID="rfvEmailRequired" ControlToValidate="Email" Display="Dynamic"
ErrorMessage="*E-mail Required" Font-Bold="True" Font-Size="Smaller" SetFocusOnError="true"
Text="*E-mail Required" ToolTip="E-mail Address Required" runat="server" />
</div>
<div class="valid-container">
<asp:RegularExpressionValidator ID="rxvEmail" ControlToValidate="Email" Display="dynamic"
ErrorMessage="*Valid e-mail address required" Font-Bold="true" Font-Size="8pt"
SetFocusOnError="true" Text="*Valid e-mail address required" ValidationExpression=".*@.*\..*"
runat="server" />
</div>
</asp:Panel>
Someone in the asp.net forums referred me to the following page but I didn't understand completely how to apply it to my particular case:
http://www.codenewsgroups.net/group/...opic17568.aspx
If someone can give me some extra tips on how to proceed, either with advice on how to implement the tips on that page or any other method, I'd really appreciate it.