ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.
0
votes
1answer
10 views
Refreshing partial view from another partial view, asp.net mvc4
I need to refresh a partial view which defined in main view from another partial view. Is that possible.
----MainView.cshtml
{
<div id=1>
@Html.Partial("partial1", Model)
</div>
...
1
vote
0answers
5 views
How to create three-state(true, false, null) checkbox in kendo ui grid
i have developed a web application with mvc 4 razor and kendo ui.
it has a grid which contains a checkbox column.
i need to have a three state checkbox(true, false, null) in that checkbox column.
...
0
votes
0answers
27 views
Html.TextBoxFor() does not generate any html markup
I've got 4 shared EditorTemplates: Tab, Group, Line & Item.
They look like this:
Tab:
@model AWMCCRM.Web.ViewModels.Tab
@Html.HiddenFor(vm => vm.Name)
<div id="[email protected](" ...
0
votes
1answer
8 views
Session timeout when using signalr
I have a web app that is used mainly for monitoring a system. It uses signalr to "server-push" updates from the server to refresh the display. The page also has some buttons which also uses the same ...
0
votes
0answers
16 views
Display one error message for 3 textboxes with mvc 4 razor engine
I'm Currently validating a fax number in which I need to to only display one error message for all of 3 of the textboxes. Like a Summary
It seems a bit picky/silly of a business requirement as ...
0
votes
0answers
8 views
How do I handle exceptions that are thrown while I'm handling exceptions?
In my Web.config I've just added the following:
<system.web>
<customErrors mode="On" />
</system.web>
Great. Now when my application throws an exception, my Error.vbhtml will ...
0
votes
0answers
10 views
Dynamically added fields to form aren't being validated
Consider the following JS code in ASP MVC application
function AddRecipient() {
$.ajax({
url: "/Recipient/Add/@Model.Email.Id",
cache: false,
success: function (html) { ...
0
votes
2answers
42 views
MVC 4 submit 2 forms with one button
I have a MVC 4 web application and need to submit two forms (maybe three forms) with one button. Is there a way to work around? or I have to merge the forms into one big form?
I searched around, ...
0
votes
2answers
17 views
Send post value to ASP.Net MVC app expecting a List
I need to send a post value to my MVC controller.
My model for this MVC has the following property.
public List<Guid> ReceiverUserIDs { get; set; }
I've tried the following formats
...
0
votes
0answers
26 views
.NET Custom Strongly Typed HTML Helper with deep property navigation
I've searched all around, read all the posts related to creating a strongly typed helper, but none have addressed my issue. Problem:
When referencing a simple property, all works well:
...
-3
votes
1answer
22 views
How to post data to MVC framework securely [on hold]
I am working on a MVC 4 project where we have 20 fields to enter. I will have other websites to post 10 fields into the MVC application, it will be prepopulated and filled in the respective field.
...
1
vote
1answer
12 views
Enable Caching for cshtml files without an associated controller
I am working on a single page application (SPA) using ServiceStack as the API provider, there are two cshtml pages avaiable, index.cshtml and admin.cshtml. The only reason for these files being cshtml ...
0
votes
0answers
14 views
ASP.NET MVC 4: How to Obtain User Information from Twitter After Successful Login?
I may be pointed to some articles here, but I have read over two dozens and cant just figure out how to do this. I really need help.
I enabled Oauth on my MVC 4 application. Users can log in using ...
0
votes
1answer
8 views
Getting unique rows from multiple tables
I have multiple tables that have a userid guid field t hat is unique. I need to get a DISTINCT count of the userids of all all rows across all of these tables. I also need to access this count within ...
0
votes
0answers
7 views
Asp.net mvc url routing. Change url
My controller is "/Home/Index".I want, when i type url to "/Dashboard/Index" or "example.com/Dashboard" my "/Home/Index action method" executed. Can you give me starting point?
0
votes
0answers
9 views
CSS bundling does not work in asp.net mvc4 app
I have the following in my BundleConfig.cs file
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/reset.css",
"~/Content/site.css"));
In my _Layout.cshtml file i set the styles like ...
1
vote
2answers
19 views
How to view an ASP.NET MVC mobile page on Visual Studio 2012
I have an open source ASP.NET MVC(nopcommerce) or nopcommerce.com it is developed in ASP.NET MVC and razor view, it is both desktop and mobile version for example it has index.cshtml and ...
0
votes
0answers
4 views
Rhino Service Bus transactions
I was able to create a test application using Rhino Service Bus and Sql Server Express. I have an MVC 4 front end that creates a message and sends it to a queue and also creates a record in my ...
0
votes
0answers
16 views
Asp.net MVC.RequestVerificationToken" is not present.
My controller is shown below:
[ValidateAntiForgeryToken]
[HttpGet]
public ActionResult LogIn()
{
return View();
}
And my view shown below:
@model ...
0
votes
0answers
6 views
MVC 4 portal login
I am just starting out with MVC 4 and love the standard web app it gives me out of the box. Looks Like I can really easily get up and running using Entity Framework and DbContext.
I have a desktop ...
0
votes
3answers
51 views
Multi-Thread or Async for a lengthy task in a website
I am currently running an e-commerce website.
So when the user checkouts, I have a bank callback page...
But as I have to perform a lengthy task after the payment occurs (which is currently done ...
0
votes
2answers
26 views
Returning JSON with web api
I am using the following to talk to a web api endpoint controller. The problem I am having is that it returns xml instead of json. From what I understand you need to pass the content type like below ...
-2
votes
0answers
32 views
Any good introducing articles on ASP.NET MVC AJAX? [on hold]
just started to set foot on MVC AJAX, can anybody recommend some articles about how to use AJAX in .NET MVC4?
I googled that but many of them are very advanced. Can any body provide some fundamental ...
1
vote
2answers
18 views
ASP.NET MVC4 Custom routing
I want to create simple blog engine. For fancy and clean url I'd like to use routing mechanism implemented in MVC4.
I added to RouteConfig.cs this lines:
public class RouteConfig
{
public ...
0
votes
2answers
11 views
How do I find max date for matching entities by entity.ids using linq in mvc 4
How do I use linq to find the last cat status for matching cat ids using mvc 4, ef5, and linq?
Example doesn't currently work right b/c max doesn't allow for datetime only ints, dec, etc... I ...
-2
votes
1answer
12 views
posting html code to MySQL database in asp.net mvc 4
I have a textarea on my page, and I want to type html into it and post it into my database, but I'm not sure how to convert it to a string where it will post into the DB.
It looks like in PHP, you ...
0
votes
0answers
33 views
A better way to pass values from view to controller - query string or model [on hold]
I'm a starter and this is a very good practice to know a better way to feed data from view into controller, as far as I know, there are 2 ways to implement that
pass from submit method, in this case ...
1
vote
1answer
28 views
how can i set layout to null in action filter?
Is it posible to set the layout to null in action filter? For example
public ActionResult SomeAction()
{
return PartialView();
}
I want to render some action with
...
-1
votes
1answer
12 views
jquery validation date format issues in chrome
im using jquery validation and have a date field, using jquery i applay the datepicker to the edit field:
HTML:
<p>@Html.TextBoxFor(m => m.rol.fecha_expiracion, new { @id = ...
0
votes
2answers
26 views
Sending data to a view from a controller event (withou client request) ASP.NET MVC 4
this question seems to be noob but i've been searching in Google, also in this forum and I couldn't find exactly what i'm looking for.
I have a SonimMQ object in the Controller in listening mode, so ...
0
votes
2answers
26 views
Bind input field to custom object instead of string
I'm using ASP.NET MVC 4 for an internal web application and I have a desire to bind HTML input fields to a custom object rather than string.
In the HTML I have input fields that will look like the ...
1
vote
1answer
30 views
Get the lowest/biggest price within an item of a List
The goal
Highlight (on HTML) the item whose its price it is the lowest or biggest of a list of items.
The scenario
There is a List<Products> on my application. Four items of this list are ...
1
vote
1answer
33 views
Visual Studio 2012 overwriting non compiled files (.js and .cshtml)
When building my solution visual studio overwrites the contents of any file that I've changed that isn't a .cs file. It is an MVC 4 project. Any help would be great thanks.
Edit : The files are ...
0
votes
1answer
25 views
Authentication Require Enter username and password to http://www
I am getting window authentication window popup on some of my views in mvc4. It works fine when I host it on local server. But when I upload my code to my hosting server, all the views works fine ...
0
votes
1answer
24 views
System.Net.Mail timing out on send
I have some older code that works fine for sending emails, but visual studio tells me that the code is obsolete and I should change it over to Net.Mail from Web.Mail. I have rewritten most of it, but ...
-2
votes
0answers
17 views
How to get data from database-view in .net MVC4? [on hold]
I have a view (not view of MVC) in my DB. I need to access in it to get the data. How should i do that ?
Regards
0
votes
0answers
8 views
Unity registration by convention doesn't work unless you rebuild solution
I am trying to use the Registration by Convention feature of Unity in a pretty standard MVC4 app. I'm using the following code...
unityContainer.RegisterTypes(AllClasses.FromAssembliesInBasePath(),
...
0
votes
1answer
7 views
How can I feed a homemade IControllerActivator to DefautlControllerFactory in ASP.NET MVC4?
So how/where in my MVC4 app can I register an instance of IControllerActivator so that it is fed to the DefaultControllerFactory?
2
votes
1answer
28 views
Retrieving Model MetaData from within a validation attribute
Using MVC4 I need to retrieve the current ModelMetadata from within a custom ValidationAttribute. The reason for this is that the Validation Attribute needs to be aware of which other attributes are ...
-1
votes
1answer
14 views
MVC4 [AllowHtml] DataAnnotation not being recognized?
I have an existing class in an MVC4 project (also using EF 4) that I need to set the [AllowHtml] DataAnnotation on. I already have annotations on several of the properties in this class (i.e. ...
-1
votes
0answers
34 views
Pagination error in controller
I have got a task to add paging. I have two class user and comments.
I integrate the fields of this two class in the home controller and return the view.But there is a error in my controller.Error ...
0
votes
1answer
17 views
Concept on displaying cross-table(conjunction) data in ASP MVC
Just a rookie in .NET MVC world and still learning
I created three EF models in framework, one is clients, one is order, and items, below is the relation:
Client Order Items
PK:ID ...
0
votes
0answers
6 views
Authentication in asp.net MVC 4 website for limited number of windows Live ID or google ID
I have created a MVC4 website and want to do authentication using google ID. But i want to authenticate limited number of people of whom i am having email id. So only those which are present in the ...
1
vote
5answers
66 views
The concept of ASP.NET Model design
First of all, this is 2nd week of my MVC learning and I'm very curious about designing a better website structure using MVC
In ASP.NET MVC framework, it is highly recommended to write most of ...
0
votes
0answers
18 views
Styling Multiple MVC Views
We are developing a back-end system to provide core functionality of making hotel booking reservations, in ASP.NET MVC 4.
We need to grant the graphical designers the ability to style the booking ...
1
vote
0answers
45 views
Entity Framework saving data in one-to-one relation
I have two tables as following:
Table 1:
ID(PK)
Name
Table 2:
ID(PK)
Email
Table1ID(FK)
I'm using Entity Framework to save data & once it is saved I retrieve it using Ajax call & display it ...
1
vote
1answer
11 views
kendoUi grid, HTTPGET default
@(Html.Kendo().Grid(Model.List)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Code);
columns.Bound(p => p.Name);
})
.Scrollable()
...
0
votes
1answer
19 views
Where to use Entities and ViewModels
In an MVC application where should the database entities be restricted to. They should obviously be used in the data layer, but should they be used/returned in the business/service layer too? What ...
0
votes
0answers
8 views
Authentication fallback scenario when Active Directory is not reachable
I've an ASP.NET MVC4 web application (form authentication) with multiple authentication providers. One of them (default one) is the standard ActiveDirectoryMemberShipProvider.
Everything is ok when ...
0
votes
0answers
19 views
passing selectedindex of one dropdown as an mvc parameter of a second dropdown on same razor view
I have the following dropdown:
<select id="coursedd" name="courseid" style="height:40px; font-size:18px;">
<option value="0" id ="defaultcid" class ="choosefilter" >----Please ...