I have a `asp:Hyperlink` set up in my applications' formview and a label
<br />
<b>Posting Site:</b>
<asp:Label ID="AppleLabel" runat="server" Text='<%# Bind("Apple") %>' />
<br />
<asp:HyperLink ID="hplPostIt" Text="Text" runat="server"/>
and in my `Page_Load` event I attempt to find the label and the hyperlink:
Label Apple = FormView1.FindControl("Apple") as Label;
HyperLink hplPostIt = FormView1.FindControl("hplPostIt") as HyperLink;
Then I try to use an if statement to change the `NavigateURL` property of the hyperlink based on the text of the label and Visual Studio complains that the object reference is not set. Here is my if else condition:
if (!Page.IsPostBack)
{
lblRow.Text = Request.QueryString["num"];
hplPostIt.Text = "Eat Now";
if (Fruit. ...
Go to the complete details ...