Results 1 to 3 of 3

Thread: How to assign a variable/value to table cell in asp.net?

  1. #1

    How to assign a variable/value to table cell in asp.net?

    I'm creating an ASP.NET web application using C# and I want to know how I could assign an integer variable to the cell of a table. I could easily do it using a text-box and label but I'd like to use a table if possible.

    I'm using Microsoft Visual Studio 2010 Ultimate

  2. #2
    Lively Member
    Join Date
    Apr 10
    Location
    York, Uk
    Posts
    103

    Re: How to assign a variable/value to table cell in asp.net?

    What kind of table (gridview?) is it databound, what is an outline of what you are trying to acheive?

    If its a gridview you want something like

    Code:
    int Myint = 100;
    dataGridView1.Rows[rowIndex].Cells[columnIndex].Value = Myint;
    rememeber though DGV's are zero based
    Last edited by Joshwah!; Aug 23rd, 2012 at 09:52 AM.

  3. #3
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 02
    Location
    Eygelshoven
    Posts
    1,556

    Re: How to assign a variable/value to table cell in asp.net?

    You could alse set the innerhtml of the tablecel you want te set. If you use an asp:Table you can set your own id's...
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •