Jump to content
Sign in to follow this  
Anti_BaiRusT

Find Control In Data Grid

Recommended Posts

Salam...

aku skung kena wat .net 2003... leceh gakk

ahaKs

ade sesape yg tahu nak find control lam Data Grid?

Private Sub dgSenarai_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgSenarai.ItemDataBound

Dim a As Label 'Dim a As New Label

a= CType(e.Item.FindControl("lblId"), Label) 'CType(dgSenarai.FindControl("lblId"), Label).Text

'a.Text = "ayam"

Response.Write(a.Text)

lblId tuh betul ade je lam itemtemplet aku

cena ye?

yg nie yg aku test... tapi kuar error Object reference not set to an instance of an object.

Line 130: Response.Write(a.Text)

:huh:

Salam...

aku skung kena wat .net 2003... leceh gakk

ahaKs

ade sesape yg tahu nak find control lam Data Grid?

Private Sub dgSenarai_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgSenarai.ItemDataBound

Dim a As Label 'Dim a As New Label

a= CType(e.Item.FindControl("lblId"), Label) 'CType(dgSenarai.FindControl("lblId"), Label).Text

'a.Text = "ayam"

Response.Write(a.Text)

lblId tuh betul ade je lam itemtemplet aku

cena ye?

yg nie yg aku test... tapi kuar error Object reference not set to an instance of an object.

Line 130: Response.Write(a.Text)

:huh:

erkkk

okies aku dah dapat dah...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...