building up a control with vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sheena777
    New Member
    • Dec 2007
    • 73

    building up a control with vb.net

    I want to be able to do the following:
    Me.lbl_ += ctl.ID.Substrin g(2) + ".text = " + dr("ErrMess"))
    Me.lbl_ += ctl.ID.Substrin g(2) - this would build up the name of the label control.
    ".text = " + dr("ErrMess")) - this would add the required text to the control.

    is there any way of buildind up a control and then adding a value to it.
  • saran23
    New Member
    • Mar 2008
    • 28

    #2
    Originally posted by Sheena777
    I want to be able to do the following:
    Me.lbl_ += ctl.ID.Substrin g(2) + ".text = " + dr("ErrMess"))
    Me.lbl_ += ctl.ID.Substrin g(2) - this would build up the name of the label control.
    ".text = " + dr("ErrMess")) - this would add the required text to the control.

    is there any way of buildind up a control and then adding a value to it.

    Hi Sheena,
    Ur not much clear.
    U can build a control and assign a value at run time,
    Is this ur asking? or something else?
    try to make me clear so that i can help u.

    Thanks
    Saran

    Comment

    • Sheena777
      New Member
      • Dec 2007
      • 73

      #3
      I have controls on the asp.net page in and html table and am trying to get a value to the grid but when I try to do thid I can't even get to the name of the field. I have been trying to loop throught the controls on the page and then get the name of the controls and then add the text to the field but when I have tried to do this it has come back as unsuccessful. I want to know how I can loop through the controls and do validations on each control in the html table. If you know any other way of getting a value back from a html table hepl would be much appreciated.Tha nks

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by Sheena777
        I have controls on the asp.net page in and html table and am trying to get a value to the grid but when I try to do thid I can't even get to the name of the field. I have been trying to loop throught the controls on the page and then get the name of the controls and then add the text to the field but when I have tried to do this it has come back as unsuccessful. I want to know how I can loop through the controls and do validations on each control in the html table. If you know any other way of getting a value back from a html table hepl would be much appreciated.Tha nks
        Have you tried using a GridView?
        Are you using a Repeater to create the table?
        What exactly are you doing.....?

        Could you please post your code for creating your HTML table, and also the code you have for looping through your controls.

        Thanks

        -Frinny

        Comment

        Working...