Embeded Tables

Discussion in 'ASP .Net' started by barry, Aug 30, 2005.

  1. barry

    barry Guest

    Hi there

    I create a table with the following code

    string strDLName = "Hello";

    Response.Write("<Table id='ManageDlTable'>");

    for(int i = 0; i < 6; i++)

    {

    Response.Write("<Tr>");

    for(int j = 0; j < 5; j++)

    {

    Response.Write("<Td>");

    Response.Write("<INPUT type='TEXT' size='10' value='" + strDLName + "-" +
    i.ToString() + "." + j.ToString() + "'>");

    Response.Write("</Td>");

    }

    Response.Write("</Tr>");

    }

    Response.Write("</Table>");



    There is a Button on the page, when i click on the button i want to know the
    value of one of the above created Input box , how do i achive this

    Barry
     
    barry, Aug 30, 2005
    #1
    1. Advertising

  2. barry

    Andrea Zani Guest

    barry <> ha scritto:
    > There is a Button on the page, when i click on the button i want to
    > know the value of one of the above created Input box , how do i
    > achive this
    >
    > Barry


    Add the attribute name:
    Response.Write("<INPUT type='TEXT' size='10' value='" + strDLName + "-" +
    i.ToString() + "." + j.ToString() + "' name='txt'>");

    And after postback:
    string value=Request["txt"].ToString();

    --
    AZ [Microsoft - .NET MVP]
    Mia Home page: http://ciclismo.sitiasp.it
    Asp.Net community: http://www.aspitalia.com
    Il mio blog: http://blogs.aspitalia.com/az
     
    Andrea Zani, Aug 30, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. penguinista

    Embeded perl & memory management

    penguinista, Jun 30, 2004, in forum: Perl
    Replies:
    0
    Views:
    621
    penguinista
    Jun 30, 2004
  2. Lei Jiang
    Replies:
    0
    Views:
    408
    Lei Jiang
    Aug 22, 2003
  3. Peter Bassett
    Replies:
    3
    Views:
    969
    Augustus
    Aug 15, 2003
  4. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    522
  5. Chris Brat
    Replies:
    5
    Views:
    718
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
Loading...

Share This Page