I am creating a print page for my form and when the print button is hit it sends the information in the textboxes, and checkboxes to a plain page and and I have labels set up to display the information.
I have an area were they check if they need an update done, something new added, or something deleted. On the page I only want one to show up on i.e. if the checked add I just want the label to say Add Requested.
the error i am running into is it is saying"
Var. 'Add' is used before it has been assigned a value. A null reference execption could result at run time.
It says the same thing for change and delete. Could someone please help w/ this problem.
Dim Add As CheckBox
Dim Change As CheckBox
Dim Delete As CheckBox
If [U][B]Add[/B][/U].Checked = True Then
Add = Page.PreviousPage.FindControl("Add")
lblAdd.Text = "Add Requested"
ElseIf [U][B]Change[/B][/U].Checked = True Then
Add = Page.PreviousPage.FindControl("Change")
lblChange.Text = "Change Requested"
ElseIf [U][B]Delete[/B][/U].Checked = True Then
Add = Page.PreviousPage.FindControl("Delete")
lblDelete.Text = "Delete Requested"