Accesing textboxs inside a table.

Discussion in 'ASP .Net' started by Slim, Jul 31, 2006.

  1. Slim

    Slim Guest

    Accessing textboxes inside a table.

    I am trying to access controls in a table like this
    customerLastSales.Rows(i).Cells(j).Controls(0)

    but asp.net says
    customerLastSales.Rows(i).Cells(j).Controls(0) does not have property called
    text.

    How can I them with out knowing their individual ID's?
    Slim, Jul 31, 2006
    #1
    1. Advertising

  2. Slim

    Slim Guest

    I tried this,

    dim tb as Textbox
    tb = customerLastSales.Rows(i).Cells(j).Controls(0)

    xxx = tb.text

    but did not work

    Ok just occurred to me you mean like this


    dim tb as Textbox
    tb = cType( customerLastSales.Rows(i).Cells(j).Controls(0),textbox)
    xxx = tb.text

    I will give that a try at work Wednesday


    "Eliyahu Goldin" <> wrote in message
    news:...
    > You need to typecast customerLastSales.Rows(i).Cells(j).Controls(0) to a
    > textbox.
    > --
    > Eliyahu Goldin,
    > Software Developer & Consultant
    > Microsoft MVP [ASP.NET]
    >
    > "Slim" <> wrote in message
    > news:...
    >> Accessing textboxes inside a table.
    >>
    >> I am trying to access controls in a table like this
    >> customerLastSales.Rows(i).Cells(j).Controls(0)
    >>
    >> but asp.net says
    >> customerLastSales.Rows(i).Cells(j).Controls(0) does not have property
    >> called text.
    >>
    >> How can I them with out knowing their individual ID's?
    >>

    >
    >
    Slim, Jul 31, 2006
    #2
    1. Advertising

  3. Slim

    Slim Guest

    made a demo, it worked fine

    "Eliyahu Goldin" <> wrote in message
    news:...
    > Yes, something like this. I am not with vb, so I can't confirm the exact
    > syntax.
    > --
    > Eliyahu Goldin,
    > Software Developer & Consultant
    > Microsoft MVP [ASP.NET]
    >
    > "Slim" <> wrote in message
    > news:...
    >>I tried this,
    >>
    >> dim tb as Textbox
    >> tb = customerLastSales.Rows(i).Cells(j).Controls(0)
    >>
    >> xxx = tb.text
    >>
    >> but did not work
    >>
    >> Ok just occurred to me you mean like this
    >>
    >>
    >> dim tb as Textbox
    >> tb = cType( customerLastSales.Rows(i).Cells(j).Controls(0),textbox)
    >> xxx = tb.text
    >>
    >> I will give that a try at work Wednesday
    >>
    >>
    >> "Eliyahu Goldin" <> wrote in message
    >> news:...
    >>> You need to typecast customerLastSales.Rows(i).Cells(j).Controls(0) to a
    >>> textbox.
    >>> --
    >>> Eliyahu Goldin,
    >>> Software Developer & Consultant
    >>> Microsoft MVP [ASP.NET]
    >>>
    >>> "Slim" <> wrote in message
    >>> news:...
    >>>> Accessing textboxes inside a table.
    >>>>
    >>>> I am trying to access controls in a table like this
    >>>> customerLastSales.Rows(i).Cells(j).Controls(0)
    >>>>
    >>>> but asp.net says
    >>>> customerLastSales.Rows(i).Cells(j).Controls(0) does not have property
    >>>> called text.
    >>>>
    >>>> How can I them with out knowing their individual ID's?
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Slim, Jul 31, 2006
    #3
  4. Slim

    Slim Guest

    "Slim" <> wrote in message
    news:...
    > made a demo, it worked fine
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    >> Yes, something like this. I am not with vb, so I can't confirm the exact
    >> syntax.
    >> --
    >> Eliyahu Goldin,
    >> Software Developer & Consultant
    >> Microsoft MVP [ASP.NET]
    >>
    >> "Slim" <> wrote in message
    >> news:...
    >>>I tried this,
    >>>
    >>> dim tb as Textbox
    >>> tb = customerLastSales.Rows(i).Cells(j).Controls(0)
    >>>
    >>> xxx = tb.text
    >>>
    >>> but did not work
    >>>
    >>> Ok just occurred to me you mean like this
    >>>
    >>>
    >>> dim tb as Textbox
    >>> tb = cType( customerLastSales.Rows(i).Cells(j).Controls(0),textbox)
    >>> xxx = tb.text
    >>>
    >>> I will give that a try at work Wednesday
    >>>
    >>>
    >>> "Eliyahu Goldin" <> wrote in message
    >>> news:...
    >>>> You need to typecast customerLastSales.Rows(i).Cells(j).Controls(0) to
    >>>> a textbox.
    >>>> --
    >>>> Eliyahu Goldin,
    >>>> Software Developer & Consultant
    >>>> Microsoft MVP [ASP.NET]
    >>>>
    >>>> "Slim" <> wrote in message
    >>>> news:...
    >>>>> Accessing textboxes inside a table.
    >>>>>
    >>>>> I am trying to access controls in a table like this
    >>>>> customerLastSales.Rows(i).Cells(j).Controls(0)
    >>>>>
    >>>>> but asp.net says
    >>>>> customerLastSales.Rows(i).Cells(j).Controls(0) does not have property
    >>>>> called text.
    >>>>>
    >>>>> How can I them with out knowing their individual ID's?
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Slim, Jul 31, 2006
    #4
  5. Slim

    Slim Guest

    thanks

    "Slim" <> wrote in message
    news:...
    > made a demo, it worked fine
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    >> Yes, something like this. I am not with vb, so I can't confirm the exact
    >> syntax.
    >> --
    >> Eliyahu Goldin,
    >> Software Developer & Consultant
    >> Microsoft MVP [ASP.NET]
    >>
    >> "Slim" <> wrote in message
    >> news:...
    >>>I tried this,
    >>>
    >>> dim tb as Textbox
    >>> tb = customerLastSales.Rows(i).Cells(j).Controls(0)
    >>>
    >>> xxx = tb.text
    >>>
    >>> but did not work
    >>>
    >>> Ok just occurred to me you mean like this
    >>>
    >>>
    >>> dim tb as Textbox
    >>> tb = cType( customerLastSales.Rows(i).Cells(j).Controls(0),textbox)
    >>> xxx = tb.text
    >>>
    >>> I will give that a try at work Wednesday
    >>>
    >>>
    >>> "Eliyahu Goldin" <> wrote in message
    >>> news:...
    >>>> You need to typecast customerLastSales.Rows(i).Cells(j).Controls(0) to
    >>>> a textbox.
    >>>> --
    >>>> Eliyahu Goldin,
    >>>> Software Developer & Consultant
    >>>> Microsoft MVP [ASP.NET]
    >>>>
    >>>> "Slim" <> wrote in message
    >>>> news:...
    >>>>> Accessing textboxes inside a table.
    >>>>>
    >>>>> I am trying to access controls in a table like this
    >>>>> customerLastSales.Rows(i).Cells(j).Controls(0)
    >>>>>
    >>>>> but asp.net says
    >>>>> customerLastSales.Rows(i).Cells(j).Controls(0) does not have property
    >>>>> called text.
    >>>>>
    >>>>> How can I them with out knowing their individual ID's?
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Slim, Jul 31, 2006
    #5
  6. You need to typecast customerLastSales.Rows(i).Cells(j).Controls(0) to a
    textbox.
    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]

    "Slim" <> wrote in message
    news:...
    > Accessing textboxes inside a table.
    >
    > I am trying to access controls in a table like this
    > customerLastSales.Rows(i).Cells(j).Controls(0)
    >
    > but asp.net says
    > customerLastSales.Rows(i).Cells(j).Controls(0) does not have property
    > called text.
    >
    > How can I them with out knowing their individual ID's?
    >
    Eliyahu Goldin, Jul 31, 2006
    #6
  7. Yes, something like this. I am not with vb, so I can't confirm the exact
    syntax.
    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]

    "Slim" <> wrote in message
    news:...
    >I tried this,
    >
    > dim tb as Textbox
    > tb = customerLastSales.Rows(i).Cells(j).Controls(0)
    >
    > xxx = tb.text
    >
    > but did not work
    >
    > Ok just occurred to me you mean like this
    >
    >
    > dim tb as Textbox
    > tb = cType( customerLastSales.Rows(i).Cells(j).Controls(0),textbox)
    > xxx = tb.text
    >
    > I will give that a try at work Wednesday
    >
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    >> You need to typecast customerLastSales.Rows(i).Cells(j).Controls(0) to a
    >> textbox.
    >> --
    >> Eliyahu Goldin,
    >> Software Developer & Consultant
    >> Microsoft MVP [ASP.NET]
    >>
    >> "Slim" <> wrote in message
    >> news:...
    >>> Accessing textboxes inside a table.
    >>>
    >>> I am trying to access controls in a table like this
    >>> customerLastSales.Rows(i).Cells(j).Controls(0)
    >>>
    >>> but asp.net says
    >>> customerLastSales.Rows(i).Cells(j).Controls(0) does not have property
    >>> called text.
    >>>
    >>> How can I them with out knowing their individual ID's?
    >>>

    >>
    >>

    >
    >
    Eliyahu Goldin, Jul 31, 2006
    #7
    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. Valentin Tihomirov

    Structural VHDL - Accesing signals of instances

    Valentin Tihomirov, Nov 1, 2003, in forum: VHDL
    Replies:
    2
    Views:
    532
    Paul Uiterlinden
    Nov 2, 2003
  2. Gönen EREN

    Accesing Items in datalist edittemplate

    Gönen EREN, Aug 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    626
    Gönen EREN
    Aug 22, 2003
  3. Lily
    Replies:
    1
    Views:
    1,489
    Teemu Keiski
    Dec 23, 2003
  4. =?Utf-8?B?QW5u?=
    Replies:
    0
    Views:
    435
    =?Utf-8?B?QW5u?=
    May 12, 2007
  5. Ann
    Replies:
    7
    Views:
    436
    Dominick Baier
    May 15, 2007
Loading...

Share This Page