Onedundiday
New Member
I am getting an error when running\[code\]string quote = Page.RouteData.Values["quote"].ToString() ?? string.Empty;\[/code\]Error: Object reference not set to an instance of an object.I understand that ToString is causing the error since the Page.RouteData.Values["quote"] is empty/null.How do I check to see if the Page.RouteData.Values["quote"] has a value before we do the ToString?