Questions tagged [asp.net-mvc-3-areas]

ASP.NET MVC and its related flavors since 2007 by Microsoft. It has come up MVC4 and it's still evolving. It allows to build applications based on Model View and Controller. It can integrate with View Engines such as Razor, Spark, etc.

  • JQuery Integeration, Fluiq Integeration
  • MVC Challenges in integration
  • View Engines
  • MVC related Patterns
163 questions
0
votes
1 answer

Getting exception "The relationship could not be changed because one or more of the foreign-key properties is non-nullable" when update an entity

I have the following models. public class Site { public int Id { get; set; } public string SiteName { get; set; } public string SiteUrl { get; set; } public IEnumerable SiteBrands { get; set; } } public class SiteBrand { …
0
votes
2 answers

Update model in ASP.NET MVC 3

I am very new in MVC trying to expand my asp.net knowledge after almost 6+ years working with web forms. MVC is really abstract to me so far but what I like is the clean coding used. I am reading "Pro ASP.NET MVC 3 Framework" book and now I am stuck…
Laziale
  • 7,965
  • 46
  • 146
  • 262
0
votes
1 answer

Is it good to have multiple EF models in one application

We are using MVC3 and EF in our application. We are following Database First approach. We are in the initial stage of or project. As of now we are thinking of having multiple EF models (generate from DB) in our application. Like for each module we…
0
votes
2 answers

How to specify different AddController code templates for different MVC 3 Areas?

I know how to customize a controller/view template for an MVC project. However, I have a few different MVC 3 Areas in my project and each Area has its own Models, Views and Controllers. Is there a way to specify different code templates for each…
Justin
  • 1,310
  • 3
  • 18
  • 29
0
votes
1 answer

Add custom class to mvc3 (not inside views, controller or model folder)

I am currently new in asp.net and mvc3. I need to add class to connect to system.data.sqlclient and some class to connect to other dll. I couldn't call the class. It is in AppCode (Not APP_CODE) and couldn't call it from controller, view and model.…
0
votes
0 answers

Build Application with asp net mvc3 and sql server enterprise edition server

I need to build an application that is using ASP NET MVC3 and try to connecting to SQL Server Enterprise Server. Could i make it? Because I don't have SQL Server Compact Edition installed and my boss want it to use SQL Server Enterprise Edition. Thx
0
votes
1 answer

Saving form when there is autopostback

I'm very new to MVC3.In my view page I've a dropdown list and some fields data in the following way. View:- //dropdownlist data @Html.DropDownList("Category", new SelectList(categoriesList, selectedCategory), "Select One", new { onchange =…
Trinadh
  • 11
  • 3
0
votes
2 answers

is there a better way to implement role based acton and view in mvc than if/else?

So I have three roles, administrators, companies and employees in my mvc .net application that uses asp.net membership in a separate database. I moved the .net membership in a different database for now because everytime I modify the model, the .net…
Thupten
  • 2,158
  • 1
  • 24
  • 31
0
votes
1 answer

Returning other page after upload image in mvc3 using c#?

I am using 2 models for one view ,one model is showing in form and other one is also using form but it is showing in a div tag so after uploading image the pop up is closing but i need to show the pop up with the data?
KiShOrE
  • 933
  • 8
  • 25
0
votes
1 answer

Always need Https to a particular route not for whole website

I want to use https for a single page instead of whole website. My application is in MVC3. I have used below code to accomplish this. [RequireHttps] public ViewResult YourAction() But after routing to my particular action, the whole website runs…
0
votes
1 answer

C# to Javascript in MVC

In my MVC application i created the view Index.cshtml and there i declared the C# variable.. Eg: string selectedvalue=""; now how to use it in the javascript function code which i wrote with in this Index.cshtml, so that i can append some text to…
P_A_1
  • 93
  • 2
  • 8
0
votes
2 answers

saving a model from a strongly typed view

Imagine you have sent a model to a view... You are attempting to save this model once you edit it. If you don't write out all of the fields (that identity the object for instance), somehow they get reset to zero or empty (if it is string). What I…
SoftwareSavant
  • 9,467
  • 27
  • 121
  • 195
0
votes
1 answer

MVC areas not diplaying when registering routes and areas with MVC extensions

I am using MVC Extension with Autofac and I am having issues with my areas. I'm not sure what I am doing wrong. Initially I had the following in my global.asax.cs: public class MvcApplication : AutofacMvcApplication { public MvcApplication() …
Brendan Vogt
  • 25,678
  • 37
  • 146
  • 234
0
votes
1 answer

How to make a Telerik Combobox display a value from a field in the model that corresponds to a value in the SelectList?

I am using a Telerik MVC control (combobox) and I am having trouble getting the value from the model to highlight as selected when the view loads. @Html.LabelFor(model =>…
user1011441
  • 161
  • 2
  • 14
0
votes
2 answers

jquery datepicker not working ,date box not appearing?

I try to use jQueryUIHelpers.Mvc3 but when i click on the box the datebox picker not appear. I installed the jqueryUIHelpers.Mvc 3 package like here http://jqueryuihelpers.apphb.com/Docmo/Overview/GettingStarted But when i am running the page and…
jonny
  • 797
  • 4
  • 24
  • 41
1 2 3
10
11