Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,
I have an gridview control where there is a column includes textboxes but
when i submit this gridview data , i am getting nothing while ctype to that textbox.

Below is my code

VB
Dim txtbox As TextBox
        
        Dim SetControlValue As String = ""


VB
txtbox = CType(row.FindControl("gv_NominatedBLDetails__ctl2_txtmbl_no"), TextBox)
                    SetControlValue = txtbox.Text


i am getting nothing for that txtbox.

Please help me out..........

Posted
Comments
[no name] 28-Aug-12 10:14am    
GridViewRow.FindControl method takes the name of the control specified at design time, not its fully qualified name (as at runtime).

1 solution

Try this:
VB
txtbox = CType(row.FindControl(Me.gv_NominatedBLDetails.ClientID), TextBox)
SetControlValue = txtbox.Text


Hope it helps. Let me know.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900