Security Trimmed Menu as Partial View

I’m rendering a menu in my _Layout.cshtml file. One section of the menu should only render if the user is in the admin role. We are using custom roles in our DB. The Admin field comes back as a single character, “Y” or “N”. This was originally a legacy application and it’s being migrated to MVC 5. LINQ or Entity Framework is not being used.

Show View in the main page itself (eg: sample.com) in asp.net mvc

I need to show my View on the main page. Suppose that I have an application called “Sample”. When a user comes to sample.com it will go to the sample.com/Home/Index. Is there any way/method to show the view in sample.com itself as we do in pure HTML Pages? Even though I’ve done several google-search I ended up in misleading content.

Can not implicitly convert System.Windows.Forms.Form to ‘String’

Hey so I have a modal popup form where I have to upload files and post data to the database. In the controller I’m retrieving the values by FormCollection. When I try to get the input fields with form collection i get this error : Can not implicitly convert System.Windows.Forms.Form to ‘String’. Here is my code:

Populating dropdown from SQL Server with ajax in C# and ASP.NET MVC

It seem that debugger doesnt enter at all at the success function. The dropdown im trying to populate is part of a modal in /Dokument/Dokument route when i press a button i get a modal with some fields. One of the fields is a dropdown which has to get values from Tipi table. In the dropdown I see nothing not even the message