Forum Moderators: open
I'm using Dreamweaver to create a lot of my asp.net (c#) code.
Pulling from a DataSet, the following dynamic text works perfectly fine, displaying in my pages:
<%# DSPOC.FieldValue("DYNTEXT", Container) %>
However, if I try to use this within an function or other code structure it gives me an error.
Now here's the workaround that doesn't make any sense to me. If I then add the following hidden text field to my code:
<asp:textbox id="dynText" text='<%# DSPOC.FieldValue("DYNTEXT", Container) %>' TextMode="SingleLine" Columns="20" runat="server" Visible="false" />
Then I can do the following
objEmail.Body += "Dynamic Text: " + dynText.Text;
Now it seems painfully obvious to me that I'm hacking this all up and adding 2 extra steps. Can someone please explain to this asp.net/c# amateur what he can do to more elegantly solve this dilemna?
MUCHOS gracis!
-mike
You would need to access the dataset directly in your code behind to manipulate it directly.
The databind just runs through the datasource to create your grids or what have you.