The following sections have been defined but have not been rendered for the layout page “~/Views/Shared/_Layout.cshtml”: “Scripts”

It means that you have defined a section in your master Layout.cshtml, but you have not included anything for that section in your View. If your _Layout.cshtml has something like this: Then all Views that use that Layout must include a @section with the same name (even if the contents of the section are empty): As an alternative, you … Read more

Specified cast is not valid?

From your comment: this line DateTime Date = reader.GetDateTime(0); was throwing the exception The first column is not a valid DateTime. Most likely, you have multiple columns in your table, and you’re retrieving them all by running this query: Replace it with a query that retrieves only the two columns you’re interested in: Then try … Read more

when do you need .ascx files and how would you use them?

It’s an extension for the User Controls you have in your project. A user control is a kind of composite control that works much like an ASP.NET Web page—you can add existing Web server controls and markup to a user control, and define properties and methods for the control. You can then embed them in ASP.NET Web … Read more

Member ‘‘ cannot be accessed with an instance reference

In C#, unlike VB.NET and Java, you can’t access static members with instance syntax. You should do: to refer to that property or remove the static modifier from Property1 (which is what you probably want to do). For a conceptual idea about what static is, see my other answer.

What is the difference between ASP.NET and ASP.NET MVC?

ASP.NET MVC2 web application is based on MVC pattern in order to facilitate unit test, without mocking pipeline asp.net, because it’s very difficult. you don’t have code on Code Behind in order to separate your code graphic and your code functional. With MVC your application become independent from view. you can replace easily technology of … Read more

Url.Action parameters?

The following is the correct overload (in your example you are missing a closing } to the routeValues anonymous object so your code will throw an exception): Assuming you are using the default routes this should generate the following markup: which will successfully invoke the GetByList controller action passing the two parameters:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)