How can I insert a eval code here?

Hi, I'm using 3.5 and C#
In my current code, which I can chage to server control if needed, I need to put a eval to get number from the backend during page load up for the number, 2500, at the Page_load event.  The number varies so I need to get that from the database.  How do I code this in the front?  Thank you.
<p>Activity Goal - <span class="h2">Increase steps to 2500 steps a day </span></p>
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jini JoseSenior .Net DeveloperCommented:
you can place a label control and write the values in page load event
Pratima PharandeCommented:

<p>Activity Goal - <span class="h2">Increase steps to <%# Eval("varname") %> steps a day </span></p>
lapuccaAuthor Commented:
Duh...  Yeah, that would be much better.  I'm just horrible about the front end coding.  so, would I just have 2 span, containing the sentence broken into 2, surrounding the label?
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Jini JoseSenior .Net DeveloperCommented:
why you need to put this inside a span ?
are you using it in any databinding control like gridview ?
if not you can use label. it will support html tags. so you can format it.
Pratima PharandeCommented:
to use lable try this

      <p>Activity Goal - <span class="h2">Increase steps to
                              <asp:Label id="Label1" runat="server" Width="40px" Height="16px"> 2500 </asp:Label>
                              steps a day </span>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lapuccaAuthor Commented:
I was given a html file.  I'm converting this to file.  I will convert these html controls to runat server if I need them to be server controls.  So do I replace that line html to something like below and then from code behind I would set the text for lable2?  Thank you,

                  <asp:Label ID="Label1" runat="server" Text="Increase steps to "></asp:Label>
                  <asp:Label ID="Label2" runat="server"></asp:Label>
                  <asp:Label ID="Label3" runat="server" Text=" steps a day"></asp:Label>
Jini JoseSenior .Net DeveloperCommented:
there are so many methods
1) <p>Activity Goal - <span class="h2">Increase steps to
                              <asp:Label id="Label1" runat="server" Width="40px" Height="16px"> 2500 </asp:Label>
                              steps a day </span>
and then from the code behind Label1.Text="2500"

2) <asp:Label id="Label1" runat="server" Width="40px" Height="16px">  </asp:Label>
then from code behind Label1.Text="Increate steps to 2500 steps a day"

Pratima PharandeCommented:
yes , yu can do that
lapuccaAuthor Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.