Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Variable Data in Web Forms

$
0
0
Re: Variable Data in Web Forms
ASP.NET
Re: Variable Data in Web Forms
12/14/2011
03:45:11 PM
3DT0XRNDO Show this entire thread in new window
From:
To:
Attachments:
None

<%# %> is databinding logic so you need to actually databind the control to make that work.

this.Page.DataBind() or this.chkEmailPassword.DataBind() forces the control to bind. If you don't call DataBind() nothing happens with binding expressions.

+++ Rick ---


Hi Rick,
I am trying to add variable text in various areas of an aspx page and cannot figure out why it is working on one and not the other.
I see other examples where you have it working using the same <%# syntax but am not sure why...
Can you tell me what I am doing wrong on the checkbox to get variable text message.
Thanks much,
Craig

<tr> <td valign="top" colspan="2" align="center"> <div class="smallbody"> <hr /> <!-- THIS WORKS -->> <%= this.GetStoreMessage(4) %> </div> <small> <!-- THIS DOESN'T WORK -->> <asp:CheckBox ID="chkEmailPassword" runat="server" Text='<%# this.GetStoreMessage(4) %>' /> </small> </td> </tr>





Rick Strahl
West Wind Technologies

Where do you want to surf today?
Reader Version: 5.0

from Maui, Hawaii



Viewing all articles
Browse latest Browse all 10393

Trending Articles