We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Control Collection

Last post 04-03-2008 10:24 PM by Mulish Mehdi. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-06-2008 5:39 AM

    • amitilak
    • Not Ranked
    • Joined on 02-21-2008
    • India
    • New Member
    • Points 50

    Control Collection

    Hi

    Can any body help me

    Please tell me how to use (control collection) or (collection control)

     in asp.net 3.5  (i e)in 2008

    if possible please send me sample code

    pls send mi vb.net code

    Regards

    Amit

     

     

    • Post Points: 10
  • 03-06-2008 7:15 AM In reply to

    Re: Control Collection

     What's your point?

    Regards,
    Mehdi Golchin
    • Post Points: 10
  • 03-06-2008 8:27 AM In reply to

    • amitilak
    • Not Ranked
    • Joined on 02-21-2008
    • India
    • New Member
    • Points 50

    Re: Control Collection

    I have to user array of control in the web form as we write Txt(0).text in vb 6.0

    I want similar code in asp.net with vb.net

    • Post Points: 10
  • 03-07-2008 10:05 AM In reply to

    Re: Control Collection

    Hi there,

    Putting your controls in a PlaceHolder, you can get your controls with "Controls" property of PlaceHolder.

    DirectCast(PlaceHolder1.Controls(0), TextBox).Text
    Regards,
    Mehdi Golchin
    • Post Points: 10
  • 03-26-2008 9:40 AM In reply to

    • amitilak
    • Not Ranked
    • Joined on 02-21-2008
    • India
    • New Member
    • Points 50

    Re: Control Collection

    I am not getting event though I have added Addhandler i.e My addhandler is not working

    pls help me with sample code

    • Post Points: 10
  • 04-03-2008 10:24 PM In reply to

    Re: Control Collection

    Hi there,

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
    AddHandler DirectCast(PlaceHolder1.Controls(0), Button).Click, AddressOf Button1_Click
    End Sub

    Public Sub Button1_Click(ByVal s As Object, ByVal e As EventArgs)
    Response.Write("OK")
    End Sub
    Regards,
    Mehdi Golchin
    • Post Points: 5
Page 1 of 1 (6 items)