Tagged Questions
ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.
0
votes
1answer
5 views
How to use TinyMCE with entity framework entities
I have entity class in created using entity framework which is in my Domain project
using System;
using System.Collections.Generic;
public partial class Test
{
public int Id ...
-1
votes
1answer
35 views
How to deserialize JSON into a List<KeyValuePair<string,string>> set
I have some JSON data :-
{
"mail":"[email protected]",
"givenName":"User",
"sn":"Name",
"uid":"mitch",
"gecos":"User Name"
}
What I'm trying to do is de-serialize this into a ...
0
votes
3answers
21 views
How to call MVC Action using Jquery AJAX and then submit form in MVC?
On my MVC View I have button:
<input id="btnSave" type="submit" name="Save" value="Save" />
When I click this button I need call one Action, do some stuff there and then Submit my form.
I ...
0
votes
1answer
14 views
angularJS href route conflict
Hello I have a common navigation bar for all my mvc pages. This is an MVC 4.0 app.
this is the model of breadcrumbs nav:
<div id="nav">
<ul class="brdcm">
@{
...
1
vote
1answer
25 views
Connecting MVC to existing table
I am having problems with trying to connect MVC to an existing table in a database, when I load up the page it displays this error to me:
The model backing the 'ChartStoredProcedureDBContext' context ...
0
votes
1answer
17 views
Change li/a tag text on click event of Url.Action
In the Razor view there is following html:
`<li id="myli"><a href="@Url.Action(MyAction, new { Id = ViewBag.Id })" >TEST</a></li>
I can Not change it in any way. Some kind ...
1
vote
0answers
7 views
Data seeding not happening after publish
The seeding routine is not being run after I publish my website. I have enabled updating the DB and indeed the DB is built and all migrations applied when I first run the application after the ...
0
votes
2answers
26 views
RedirectToAction to same controller
In My Asp.net MVC code, I sometimes write
return RedirectToAction("Manage", "User", new {Area = "Users", id = userId});
and sometimes
return RedirectToAction("Manage", new {id = userId});
...
0
votes
0answers
4 views
MVC4 WebApi Global Object reuse by all requests
I have searched every forum and google etc but nothing directed me in right path.
Requirement: I am using a COM object which can be initialized only once. But, when I try with webapi the first run ...
0
votes
2answers
30 views
SQL Server columns missing in Entity Framework
I'm using ASP.NET MVC 4, Entity Framework 6, Visual Studio 2013, IIS 7 and SQL Server 2012 Express. I recently made a change to our web app and added 2 columns using code-first migrations. Tested ...
0
votes
0answers
9 views
illegal attempt to associate a collection with two open sessions fluent nhibernate
I have this exception "illegal attempt to associate a collection with two open sessions", it raises every time I save entity contains collection of children.
I google it. I found that I opened two or ...
0
votes
2answers
26 views
Html.ActionLink reference error MVC4 in Areas
I've created an Area in my app called "Admin" and when I attempt to use @html.actionlink() to build some menu items I'm met with a reference error.
system.web.WebPages.Html.HtmlHelper does not ...
0
votes
0answers
12 views
Update Marquee Data from SQL DB every x seconds
I'm using this javascript marquee in my MVC4 Razor application. Currently the marquee will show data from my db but it doesn't update. I would like my marquee to update every x seconds.
I tried ...
0
votes
0answers
21 views
Unable to print drop down menu inside ul tag
I am trying to display the menu in mvc4. but unable to get it done. My concept is after user logs in I am going to print his username and then when you click on username the menu has to come. my code ...
0
votes
1answer
13 views
MVC WebAPI application 40+ seconds to launch the webpage
I've developed a web application with MVC 4, WebAPI, EF6, BootStrap, JQuery. It works fine. But, it takes 40+ seconds to load the webpage. How should I verify, where it is taking too much of time. I ...
0
votes
0answers
7 views
MVC ExcelDateReader - Identify Data?
Is it possible using ExcelDateReader to identify if data being returned from a cell, belongs to a specific column?
Below is a sample of the code I am using to open an Excel spreadsheet, but I need to ...
1
vote
4answers
45 views
How do you add @html tags using javascript?
There's sometimes that you need to add another textbox or other input type for additional information. Ok, say, A Customer can have many Address. As the user completes the form and as he reach the ...
0
votes
1answer
10 views
Adding custom created route into route collection in Global.asax
I'm quite new to asp.net mvc, so this could be quite trivial.
I'm trying to do asp.net mvc routing based on subdomain. I have been following this StackOverFlow post. I created the class as said but ...
0
votes
0answers
13 views
Asp.Net MVC, can I remove/replace a specific character from all POSTs in a Controller?
In a certain controller, I want to be able to replace '\' with '/' in all POSTs - is this possible to add an Attribute or something to filter all POST requests? Please let me know if this is not ...
2
votes
1answer
28 views
Initialize values in Interface
I have a dll that exposes Interface which looks like this:
public Interface IClientGroup
{
IQueryable ClientsGroup {get;}
void Activate(ClientGroup clientgroup);
//many other members and functions
}
...
0
votes
0answers
13 views
How to define a MVC shared EditorTemplate in an external assembly?
I'm trying to reuse shared templates in my MVC applications. For this, I use the Razor Generator VS Extension and I set RazorGenerator as the Custom Tool for my *.cshtml files. In my solution, I've ...
1
vote
1answer
25 views
MVC4 Windows Authentication Redirect to Account/Login
I am setting up Windows Authentication in an MVC 4 application using Visual Studio 2013 and using the IIS Express Development Server. However, I get redirected to /Account/Login (as if I were using ...
0
votes
0answers
13 views
Internet Exploder submitting a null file from hidden iframe
I have a page with a jqGrid. On that grid I've added a custom button to the pager that, when clicked, opens a file browser for the user to upload an excel file. The file input is wrapped in a form and ...
0
votes
0answers
22 views
MVC4 script bundle url fails to load when jQuery UI is included
Before moving my code to production, i turned debug="false" in web.config and ran the project locally using IIS Express and everything loaded and worked properly.
the bundle was generated and loaded ...
0
votes
1answer
41 views
Proper way to use lambdas in Razor MVC 4
I'm having some trouble understanding how to manipulate model data in the cshtml page. Most of my issue may be as a result of not fully understanding how/why lambdas are used.
one example of ...
0
votes
0answers
12 views
Uploading multiple files using AFNetworking to MVC.NET
My Objective-C client code for uploading two files is:
AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] init];
NSDictionary *params = @{@"foo" : @"bar"};
NSURL ...
0
votes
1answer
32 views
How can I open an aspx from a mvc4 project?
I have a MVC4 application in which I need to add some old aspx pages. I added it in Views/Report folder like this
I have added the following code to routeconfig to avoid routing for aspx pages.
...
0
votes
0answers
11 views
call public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) object from a button's click event
I have a partial view in which I have implemented grid in which I can add/remove rows dynamically.
Now I want to call below object on my partial view's button click event.
public object ...
0
votes
0answers
11 views
Populate kendo UI ListView by using data fom database
I am new to Kendo UI and ASP.Net MVC4.
I am working on a project Shopping Cart.
I want to populate ListView using data from database tables.
Inside database I am having a category table and I want to ...
-2
votes
1answer
43 views
How to override an action in mvc controller?
How to override an action method in a controller? Can anyone explain with a small example.
And one more thing to ask , can we do this without virtual keyword?
0
votes
0answers
12 views
how to add Dynamic column from datatable to webgrid in Dot Net MVC4
I have some difficulties on Binding the DataTable in WebGrid
public PartialViewResult Hoteling()
{
var model = new FloorPlanner.Models.HotelingViewModel();
...
0
votes
0answers
22 views
Submit button in partialview return result without layout
I have a shared layout with partialView for login in it.
If login process succeeded it redirect to main page and everything works, but if login failed,
It returns only the partial view with the errors ...
0
votes
0answers
19 views
MVC4 application, How to make every element (dynamically created table or div) to send ajax request to controller with its ID?
i have a problem and i hope you have the solution. It's a Model-View-Controller-4 .net application.
I dynamically create elements (table and div) and i need them to refresh somehow, but each element ...
0
votes
3answers
28 views
Cascading dripdown list in MVC4 Razor
I have 3 tables country , state , city .
I want cascading drop down list as usual.
How can i do that without using the LINQ.
I don't know that how to start. I want to do that using RAZOR. It is ...
0
votes
2answers
41 views
model values are null when running ActionResult
I have the following ActionResult in a controller called RoleController
[HttpPost]
public ActionResult UsersForRole(RoleModel roleModel)
{
if (ModelState.IsValid)
{
...
0
votes
0answers
30 views
The view 'Index' or its master was not found
Hello all :) (I know there are many questions of the above error on the forum, but this is as far as I could find not a duplicate question.)
I am trying to resolve the error below.
...
0
votes
0answers
7 views
Meta property=og is not being detected in facebook when sharing a link of a MVC project
Am working on a mvc4 project. I want to share my page in facebook defining the meta data properties myself. For that i have used the following code inside head tag:
<meta property="og:title" ...
0
votes
0answers
12 views
In MVC4 application I need to bind the database table columns values as a Grid header. Is this possible in MVC?
In MVC4 application I can able to bind the database table columns into the Grid Header. But I need to bind the database table columns values as a Grid header. Is this possible in MVC?
Example:
...
0
votes
0answers
6 views
Web grid - edit popup model [on hold]
I'm relatively new to asp.net mvc4 and working my way through tutorials and applying them to a web application i'm developing.
I have been using the webgrid to display information from my mssql ...
0
votes
0answers
23 views
Is it possible to have apsx pages with VB.Net code behind pages in MVC4 project written in c#.net
We are developing a MVC4 application using C#.Net 4.0, we need to include some pages developed using vb asp.net to our project.
Is it possible to include these aspx pages with vb.net codebehind ...
0
votes
0answers
5 views
Get kernel in class files, which are not controllers
I am using dependency injection in my projects. I have a web project (Proj A) in which the kernel and all the bindings were registered. I have few other (Proj B) projects as well in which few of the ...
0
votes
0answers
45 views
Solved .role ' ' was not found
I am add new roles in mvc 4 app ... but every time it gives this Error
here is my Register Method
//
// POST: /Account/Register
[AllowAnonymous]
[HttpPost]
public ...
0
votes
1answer
14 views
MVC 4 Alternative to OleDb for Excel
Is there an alternative to using OleDb for reading data from an Excel spreadsheet?
I am struggling with missing resources on the remote hosting server, I am getting the following error The ...
-1
votes
1answer
29 views
Submit button issue in dialog (MVC4) [on hold]
No matter what, submit buttons are not working in my dialog. At all.
Not only with my own code, but also in a simple sample:
<div id="dialog">
Your non-modal dialog
<input ...
0
votes
1answer
22 views
Sorting and paging using Angularjs and MVC4
I am working in MVC4 with angularjs.I wanted to perform paging and sorting .
below is sample code
**Angularjs part**
=======
function ctrlRead($scope, $filter) {
// init
...
-1
votes
1answer
17 views
Publishing ASP.NET MVC website including entity model and SQL Server database
I have developed an ASP.NET MVC 4 website using C# running on my local machine, and I want to publish it to our company's web server (as an aside, how many developers truly understand MVC?). We don't ...
0
votes
1answer
13 views
The local variable assignment was printed as output on asp.net mvc
I have a script like below on my View:
@{int count = 0;}
@foreach (var item in Model)
{
<div >
<div class="col-md-4"><img src="@item.ImageLink" />
...
0
votes
0answers
9 views
RDLC LOCAL report in report viewer in asp.net mvc without report server and without iframe
I have wrote code to show rdlc report in report viewer using web form (.aspx) page. But i do not want to use iframe to show report. I found most of the solutions on internet using iframe.
I used ...
0
votes
1answer
13 views
Accessing images in a different project, but in the same solution
I made this website for a client which wanted to be able to upload images and then use those images to create some dynamic content on his site. It all works fine, but now I want to isolate that ...
0
votes
0answers
7 views
MVC How do I get the authorization node of web.config to use ADFS claims for ELMAH
I have an existing MVC Application that uses ADFS 2.0 to issue claims.
The Claims are issued by a database NOT active directory groups and therefore are not using the ClaimTypes.Role namespace (I ...