Accessing label ID from DataGrid Args?

P

Patirck Ige

I have a sub program that updates a DataGrid like below
And i'm makiing use of the OrderID to update the data

Sub Update(ByVal Src As Object, ByVal Args As DataGridCommandEventArgs)
Dim OrderID As Label = Args.Item.FindControl("OrderID")
Dim ord_id As String = OrderID.Text
End Sub

But i now have another sub program below and i would like to make use of the
same OrderID
used in the Update Sub :-

Sub GetName_Email()
Cmd.Parameters.Add(New SqlParameter("@OrderID", SqlDbType.Int, 4)).Value =
OrderID.Text
End Sub


How can i get access to it if i use "OrderID.Text" or "ord_id" is says its
not defined which is true??
 
C

Curt_C [MVP]

call it from within the same event, then there is no hassle, or pass the
info to your sub.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top