Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7911705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:20:56+00:00 2026-06-03T13:20:56+00:00

Basically value1 and value2 are two numbers from a database, when I click button1

  • 0

Basically value1 and value2 are two numbers from a database, when I click button1 I want to get the number in the code behind (c#) so I can add another number to it and the same for value2. I simply require the line needed in c# that will extract the Eval value…. Your help will be much appreciated.

<asp:Button ID="button1" runat="server" Text='Plus' OnClick="button1_Click"/> 
<asp:Label ID="value1" runat="server" Text=' <%# Eval("value1") %> ' /> 
<asp:Button ID="button2" runat="server" Text='Minus' OnClick="button2_Click" />  
<asp:Label ID="value" runat="server" Text=' <%# Eval("value2") %> '/> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:21:00+00:00Added an answer on June 3, 2026 at 1:21 pm

    You need to ‘bind’

    <asp:Label ID=”value1″ runat=”server” Text=’ <%# Bind(“value1”) %> ‘ />

    Eval is one way and Bind is two way databinding. You may need to use Container.DataItem possibly but bind will probably do the job.

    You will then be able to read the value of the Text attribute i.e.

    var theText = value1.Text;
    

    Additionally because the control is in a listview you may need to navigate the ListView controls collection:

    theListView.FindControl("theIdOfTheControl")
    

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically i want to update my database with values from an array that i
Basically I want to get the value of a textbox which is to select
Basically I want to alter the boolean value selecting from the table: e.g.: SELECT
How can I get the return value of a process? Basically I'm ** ShellExecute
I'm working on a parts database, where every part number can also be an
Basically what I want is cross product of two tables. t1 is : +------------+
My aim is to get two numbers and perform an corresponding to the values
I want to take two value from user i.e name and location and then
I'm asking this again, because I can't get a straight answer from other questions
Basically: Can my model classes contain @NoBinding annotations with multiple values? If I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.