i has one Multiview, inside multiview i put
view , and inside view control i put formview ,in this
formview i put my control such as dropdownlist and etc
my problem is when i run this i got an error the error is below:
Object reference not set to an instance of an object.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error:
Line 65: 'drpsubmerit.Enabled = True
Line 66:
Line 67: If drpmerit.SelectedValue = "kelakuan" Then Line 68: drpsubmerit.Items.Clear()
Line 69: drpsubmerit.Items.Add("Kehadiran 100 % Tanpa Datang Lewat")
the correct way should be like this.. i can choose from the drownlist A then the second dropdown list which is
dropdown B will appear thier value base on value that has been selected in
dropdownlist A
afastars
Member
52 Points
221 Posts
Find Control In FormView
Nov 18, 2012 12:37 AM|LINK
i has one Multiview, inside multiview i put view , and inside view control i put formview ,in this formview i put my control such as dropdownlist and etc
my problem is when i run this i got an error the error is below:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 65: 'drpsubmerit.Enabled = True Line 66: Line 67: If drpmerit.SelectedValue = "kelakuan" Then Line 68: drpsubmerit.Items.Clear() Line 69: drpsubmerit.Items.Add("Kehadiran 100 % Tanpa Datang Lewat")the correct way should be like this.. i can choose from the drownlist A then the second dropdown list which is dropdown B will appear thier value base on value that has been selected in dropdownlist A
i need help
below these is my current code:
Dim drpmerit As DropDownList
drpmerit = VFormMerit.FindControl("Drpmerit")
Dim drpsubmerit As DropDownList
drpsubmerit = VFormMerit.FindControl("Drpsubmerit")
If drpmerit.SelectedValue = "kelakuan" Then
drpsubmerit.Items.Clear()
drpsubmerit.Items.Add("Kehadiran 100 % Tanpa Datang Lewat")
drpsubmerit.Items.Add("Amanah/Bertanggungjawab Terhadap Segala Tugas")
drpsubmerit.Items.Add("Kebersihan Diri")
drpsubmerit.Items.Add("Kecekapan Dan Ketepatan Kerja")
drpsubmerit.Items.Add("Bekerjasama Dan Sedia Menolong")
drpsubmerit.Items.Add("Berbudi Bahasa")
drpsubmerit.Items.Add("Kehadiran Ibu Bapa Di Mesyuarat Agung PIBG")
End If
afastars
Member
52 Points
221 Posts
Re: Find Control In FormView
Nov 18, 2012 03:45 AM|LINK
resolve already...i silly mistake