Results 1 to 2 of 2

Thread: Passing a textbox value from a datarepeater

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2010
    Posts
    30

    Passing a textbox value from a datarepeater

    I have a datarepeater with a textbox that shows a row id in a sql server, for each instance of the datarepeater there's a button on the datarepeater that I'd like to have the user click, and that would send the text from the textbox on that row to another form, possibly just to a textbox on that other form. anyone know the code that would accomplish this? i've been looking all around but no luck, (i did have luck with the item_cloned solution for combobox's in datarepeaters tho..) Thanks.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Nov 2010
    Posts
    30

    Re: Passing a textbox value from a datarepeater

    I got it!

    on the calling form i put,

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim Instanceform2 As New Wuploader

    If DataRepeater1.CurrentItem Is Nothing Then Exit Sub

    Instanceform2.XValue = DataRepeater2.CurrentItem.Controls("TblidTextBox1").Text()

    Instanceform2.ShowDialog()
    End Sub


    and on the form called i put

    Private x As String

    Public Property XValue() As String
    Get
    Return x
    End Get
    Set(ByVal value As String)
    x = value
    End Set
    End Property

    Me.TextBox2.Text = x.ToString





    Thanks just the same

Posting Permissions

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



Click Here to Expand Forum to Full Width