T
tshad
Is there a way to put inline data in a label?
For example, I would normally do something like this to put a name that I
have in my session variables in my asp:label:
Name.Text = Session("FullName")
....
<asp:Label ID ID="Name" runat="Server">
Can I get around the extra code by just doing something like (I know this
doesn't work):
<asp:Label ID="Name" Text='<%# session("FullName") %>' Runat="Server">
Similar to Binding to a variable, but get it directly from my session
variables?
Also, could I do a similar thing from a function (Obviously, if you can't do
the above - you probably can't do this):
<asp:Label ID="TotalAmount" Text='<%# MoneyFormat(Session("Total")) %>'
runat="Server"/>
Where MoneyFormat is a function I might use to format my session variable in
some money format.
Thanks,
Tom
For example, I would normally do something like this to put a name that I
have in my session variables in my asp:label:
Name.Text = Session("FullName")
....
<asp:Label ID ID="Name" runat="Server">
Can I get around the extra code by just doing something like (I know this
doesn't work):
<asp:Label ID="Name" Text='<%# session("FullName") %>' Runat="Server">
Similar to Binding to a variable, but get it directly from my session
variables?
Also, could I do a similar thing from a function (Obviously, if you can't do
the above - you probably can't do this):
<asp:Label ID="TotalAmount" Text='<%# MoneyFormat(Session("Total")) %>'
runat="Server"/>
Where MoneyFormat is a function I might use to format my session variable in
some money format.
Thanks,
Tom