This question is locked. New answers and comments are not allowed.
Hi
I am using the following menu and its giving error object reference is not to instance of object. Basically I have to use ASP.NET Webforms for reporting(SSRS Reporting Viewer) purpose and ASP.NET MVC side by side. In the Global.asax file i have mentioned the following Routes. on the menu control i have added Route("ReportRoute") for the run reports menu. When i Click RunReport i have to redirects to RunReports.aspx page on the CommonReports Folder. Can you please look into this and let us the know solutions
routes.MapPageRoute(
"ReportRoute", // Route name
"ReportRoute/{reportname}", // URL
"~/CommonReports/{reportname}.aspx" // File
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new
{
controller = "Home",
action = "Index",
id = UrlParameter.Optional
} // Parameter defaults
);
@Html.Telerik().Menu().Name("MyMenu").Items(items =>
{
items.Add().Text("Home").Url("/Home");
items.Add().Text("Lease Administration").Items
(sub1 =>
{
sub1.Add().Text("Import Landlord Info").Url("/Lease/ImportLandlord");
sub1.Add().Text("Maintain Lease").Url("/Lease/MaintainLease");
sub1.Add().Text("Landlord Reports").Url("/Lease/ImportLandlord");
sub1.Add().Text("Utility Reports").Url("/Lease/MaintainLease");
}
);
items.Add().Text("Lease Accounting").Items
(sub1 =>
{
sub1.Add().Text("Acccounting Details").Url("/Lease/MaintainLease");
sub1.Add().Text("Reports").Url("/Lease/MaintainLease");
sub1.Add().Text("Journal Entries").Url("/Lease/MaintainLease");
sub1.Add().Text("Reconciliation").Url("/Lease/MaintainLease");
}
);
items.Add().Text("Reporting").Items
(sub1 =>
{
sub1.Add().Text("Report Dashboard").Url("/Dashboard/");
sub1.Add().Text("Run Reports").Url("/RunReport/").Route("ReportRoute");
}
);
items.Add().Text("Contact Us").Url("/Home/ContactUs");
}
)
I am using the following menu and its giving error object reference is not to instance of object. Basically I have to use ASP.NET Webforms for reporting(SSRS Reporting Viewer) purpose and ASP.NET MVC side by side. In the Global.asax file i have mentioned the following Routes. on the menu control i have added Route("ReportRoute") for the run reports menu. When i Click RunReport i have to redirects to RunReports.aspx page on the CommonReports Folder. Can you please look into this and let us the know solutions
routes.MapPageRoute(
"ReportRoute", // Route name
"ReportRoute/{reportname}", // URL
"~/CommonReports/{reportname}.aspx" // File
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new
{
controller = "Home",
action = "Index",
id = UrlParameter.Optional
} // Parameter defaults
);
@Html.Telerik().Menu().Name("MyMenu").Items(items =>
{
items.Add().Text("Home").Url("/Home");
items.Add().Text("Lease Administration").Items
(sub1 =>
{
sub1.Add().Text("Import Landlord Info").Url("/Lease/ImportLandlord");
sub1.Add().Text("Maintain Lease").Url("/Lease/MaintainLease");
sub1.Add().Text("Landlord Reports").Url("/Lease/ImportLandlord");
sub1.Add().Text("Utility Reports").Url("/Lease/MaintainLease");
}
);
items.Add().Text("Lease Accounting").Items
(sub1 =>
{
sub1.Add().Text("Acccounting Details").Url("/Lease/MaintainLease");
sub1.Add().Text("Reports").Url("/Lease/MaintainLease");
sub1.Add().Text("Journal Entries").Url("/Lease/MaintainLease");
sub1.Add().Text("Reconciliation").Url("/Lease/MaintainLease");
}
);
items.Add().Text("Reporting").Items
(sub1 =>
{
sub1.Add().Text("Report Dashboard").Url("/Dashboard/");
sub1.Add().Text("Run Reports").Url("/RunReport/").Route("ReportRoute");
}
);
items.Add().Text("Contact Us").Url("/Home/ContactUs");
}
)