The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern. The latest release of the framework offers REST-style web services development capability, also known as Web API.
-1
votes
0answers
6 views
asp.net mvc facebooktemplate causes “'Newtonsoft.Json.Linq.JObject' does not contain a definition for 'user_id'” when run in a facebook app
Been following the tutorial for the new facebook mvc template from http://go.microsoft.com/fwlink/?LinkId=269921
However even with the basic app template I'm unable to get it to run as it just flags ...
0
votes
1answer
41 views
ASP MVC Blog Database not creating Id number
I have been going through the early stages of a tutorial on youtube http://www.youtube.com/watch?v=WwmUFTWEh6Y
public ActionResult Update(int? id, string title, string body, DateTime dateTime, ...
0
votes
2answers
21 views
Using Entity framework with SQL Server 2012 (local *.mdf database)
I am trying to create a database in an MVC project. Code-First approach. I wrote my models and a DbContext database. I am having trouble making the connection to the database. My suspect that the ...
0
votes
0answers
15 views
Spa hot towel user authentication module?
I installed hot towel template. However, unlike the built-in spa template, there is no log in code. Can I create an empty project using visual studio built in spa template and copy the login code ...
0
votes
0answers
20 views
Entity Framework - Check for pending migrations
In our production environment, we have an automated deploy script that takes down our site, runs migrations, and then brings it back online. We'd like to avoid taking the site down by just switching ...
1
vote
0answers
18 views
Why is my Kendo Grid only showing one row at a time?
My grid contracts vertically to show barely one row at a time. It looks like this:
The bottom grey bar, with "1 - 2 of 2 items" also has the pager on the right hand side, and there is a large white ...
1
vote
1answer
21 views
Passing a simple IEnumerable to view and using foreach to loop through returns a blank screen?
I have a simple List of Customer model class which I am passing to my view. I want to iterate through the customer class but my view is telling me to bugger off by returning a blank screen. Please ...
1
vote
3answers
53 views
Estimate: How long to learn .net/javascript efficiently
We have a slightly over optimistic boss, so I would like to hear it from other people.
Someone who has about 3 years of good PHP, HTML, and CSS knowledge. However this person has never really worked ...
0
votes
3answers
70 views
Form name value based on c# variable
Is there any way to create the name variable in an input text field with a c# variable in it?
So something like:
<input type="text" name="Status + @i" value="" />
I tried a few different ...
1
vote
4answers
42 views
how to override a views Layout declaration
In asp.net MVC 3 is there a way to override the Layout declaration set in a view from a controller or action filter?
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
I have tried overriding the ...
1
vote
1answer
20 views
.mdf file not able to attach at runtime MVC4
ERROR:
Cannot attach the file 'C:\Users\dboyle\Desktop\New folder
(2)\OilNGasWeb\OilNGasWeb\App_Data\aspnet-MvcApplication4-20130726115749.mdf' as database ...
0
votes
2answers
43 views
populating dropdown lists from linq to sql statement
i have two different dropdown lists and each have a select statement to return proper information. Running into a few issues:
what format should i properly return the results from select statement ...
0
votes
2answers
34 views
How to process an HTML email for previewing on a web page?
I'm working on a testing tool in asp mvc. One of the features is to preview html emails.
However, these emails are going to have things like doctypes and css tags. What are my options to properly ...
0
votes
1answer
15 views
How to bind to detail using Bootstrap Modal Rowlink with Knockout - MVC 4
I am struggling to get my head around opening a modal form from a table generated from WebApi using Knockout. Actually, more correctly, I am struggling with home to bind the modal to the clicked row.
...
-1
votes
1answer
37 views
Asp.Net best login method
I found the following code on a website.
string connect = "Provider=Microsoft.Jet.OleDb.4.0;Data
Source=|DataDirectory|contacts.mdb";
string query = "Select Count(*) From Users Where Username = ? And ...
0
votes
0answers
10 views
Jquery sortable index change to ASP.NET MVC controller
I am trying to get the model binder to recognize the change. I am not sure what I am missing here. Basically the initial page population pulls the page number from the database. I then have the ...
-1
votes
1answer
42 views
Is Asp.NET MVC Not Suitable For N-Tier Architecture? [on hold]
Firstly, I have a question which already I know the answer but I want to ask;
Which one is manageable on HTML source?? Asp.NET Web Forms or Asp.NET MVC??
My second and important question;
Think a ...
0
votes
0answers
15 views
MVC with Internet Explorer 8 : Html.PasswordFor shows rectangle symbols
I'm having issues with Html.PasswordFor objects on IE8. Instead of it showing a "black circle" for hidden text it would show the "broken rectangle" symbol. Was wondering if this is just a font issue ...
-2
votes
0answers
16 views
Recommendation for an html ribbon bar
Can anyone recommend an html ribbon bar. I am building an ASP.NET MVC3 website and have been asked to add a ribbon bar control at the top of the layout.
1
vote
1answer
13 views
keep the current page changes before actionlink
Ok guys, this may be a stupid question, I can not search any related issue, perhaps it is not a problem
for ex. I have a nav menu in my mvc 4 app like this
@Html.ActionLink("Driver", "Index", ...
1
vote
1answer
39 views
Converting sql statement to lambda to be used in razor page
i have this select statment from web forms project and i want to convert it so i can use in my mvc project to be displayed in my dropdown lists in a razor page
<asp:SqlDataSource ID="Sections" ...
1
vote
1answer
52 views
infinitive loop at the end of action method
Recently I have faced with a very strange problem. My Action method must return JsonResult,and all is good untill the last break point before return (At this moment I have correct json result).Then in ...
1
vote
0answers
10 views
EndRequest - Context.Response.StatusCode is always 200 (even when it should be 404)
I'm trying to implement 404 handling as described here:
http://stackoverflow.com/a/9026941/131809
In my EndRequest block, I have this:
public class MvcApplication : HttpApplication
{
protected ...
0
votes
0answers
8 views
ASP.NET Outputcache and Data Inside an Action Method Retrieved One Time
Is there a way to not make two calls to a database, if I wanted to cache the request call if a database call satifies my criteria, and if not I would make that same call within the action method. I ...
0
votes
2answers
18 views
get current action in partial view and run jquery
I have a partial view with a menu in, depending on the current action i want to show or hide a link, my attempt at this is below
@if ...
-1
votes
1answer
15 views
ASP.NET MVC 4 - Posting Polymorphic Data Objects
I have a viewmodel consisting of a handful of properties:
public class FooDataViewModel : IValidatableObject
{
/* Several Properties working as expected */
public ICollection<Foo> Foos {get; ...
0
votes
1answer
17 views
Can I use MiniProfiler to instrument an ASP.NET MVC WebApi website?
The ASP.NET MVC website I'm working on has some (Controller-derived) "user" pages and some (ApiController-derived) "api" pages.
The site uses MiniProfiler to instrument the "user" pages, and I really ...
0
votes
1answer
12 views
Elmah.MVC working under IIS Express but not IIS 7.5
I'm trying to get Elmah working under ASP.NET MVC and I thought I had.
I used the very convenient Elmah MVC project which automatically setup my web.config file.
Now if I run the project under IIS ...
0
votes
1answer
15 views
For Loop in Kendo Grid Template
I've a big trouble with Kendo Grid.
If I use a for loop as client template as this
col.Bound(m => m.Compteurs)
.ClientTemplate("# for (var i=0;i<4;i++) { console.log(i) } #");
i is never ...
1
vote
1answer
37 views
Mvc3 C# - Is it possible to call an action from a different controller?
In my project I have two different controllers.
This is the main one:
public class Main : Controller
{
public ActionResult Index()
{
return View();
}
}
And this is the other ...
0
votes
1answer
40 views
MVC4 Upload Image and insert into database
Im working in MVC4 visual studio a few time ago. im really new in this and hope anyone can help me.
I have a form in my website with input type="text" and input type="file".
I want to insert a new ...
0
votes
0answers
11 views
Fillin jqGrid depend on url parameter
I use c#, mvc, jqGrid and Trirand.Web.Mvc
I have two pages, on the first page a grid with Roles and on the second Grid with rights. Depend on the selected role on the first page I would like to ...
0
votes
1answer
24 views
Nested Lists in MVC 4 page
I have an object relationship as follows:
Refund contains a list of Vouchers
Voucher contains a list of line items
I want to make a single MVC page that can allow a user to enter in all the details ...
0
votes
2answers
15 views
Using one similar route url for two different parameter types
So I have following routes in place in my project, what I want to do here use one similar looking route url but direct it to two different actions based over the parameter provided, if the given ...
0
votes
3answers
48 views
Entity Framework Database First Automatically Validate Max Length for Properties
I'm using EF Database First with an existing legacy database. Almost every field has a maxlength value in the database, and I can view this value in the .edmx file.
For example, on of the fields ...
-2
votes
1answer
57 views
Logging the exception in a notepad [on hold]
I have hosting a web application.
If I receive exceptions from WCF services,
I want to write it into a notepad and save it in some location where the application is hosted in IIS.
How to write the ...
0
votes
1answer
26 views
How to add Css class in Html.ActionLink by JavaScript?
I have a mainmenu view:
<div class="submenu">
<ul>
@foreach (var p in Model)
{
<li>
<div class="manu_bg">
...
0
votes
0answers
7 views
Share Photos on facebook using facebook app in MVC using Asp.net
I'm creating a facebook app in which user can upload photos and create a separate album for his/her photos.
I've done all of this work using Asp.net MVC. Everything is working fine on Facebook.
I ...
0
votes
1answer
35 views
How to pass an object from one view to another in ASP.MVC
I still don't quite grasp how one can use information in the one cshtml file, gotten from another cshtml file. My program consists out of a gallery. When the user clicks on one of the pictures, ...
0
votes
1answer
41 views
pass a List<Guid> to action method as Json issue
I am having some issues building a Json string of guids to pass to my action method.
I have collected my guids into an array like this:
var regEx = ...
0
votes
0answers
6 views
Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'
I started a new mvc 4 project and migrated an mvc 3 project in it (controllers/models/scripts etc). While everything compiles now i get the following error:
Attempt by security transparent method ...
-1
votes
1answer
41 views
Getting user selected dropdown value
I have a Custom Attribute based validation using MVC4 in
I can get user entered value in a textbox using following code using propertyinfo[]
PropertyInfo textBoxEnteredValue = ...
-1
votes
0answers
24 views
“undefined” error on first attempt to download a file
I'm new to ASP.NET MVC and I'm practising by making small applications.
My first application is a website with links to download files. I've found many examples showing how to do this, for example ...
0
votes
1answer
20 views
asp.net mvc render a webform as a partial in a razor view
I'm trying to use the asp.net webforms sitemap and menu control to build my asp.net mvc's sites navigation.
There are many tutorials about embedding razor views into webforms, but I want to go the ...
0
votes
1answer
25 views
Call Jquery function inside razor's subviews
I want to use such an activity $('#myModal').show();
The original calling plugin routine is as follows:
<script type="text/javascript">
$(document).ready(function() {
...
0
votes
0answers
15 views
Asp.Net MVC3 application deployment on godaddy server
I have an Asp.net MVC3 application. I am done with it's development procedure and it worked fine on my local server "localhost".
Now the problem that I am facing is with it's deployment to the ...
0
votes
1answer
15 views
Whats the Rebus equivalent of NServiceBus RegisterWebCallback? (if any)
I am used to register callbacks from within ASP/MVC applications in order to get notified of responses to events send/published. In order to do so, NServiceBus provides some methods ...
0
votes
0answers
6 views
Load Balanced Server SqlCacheDependency
I have in-process cache in my web solution.
I have 2 web servers and 1 db.
I have looked at out-of-process caching solutions, but was wondering if I could just setup an SqlCacheDependency instead.
...
0
votes
0answers
17 views
How create MultipartFormFormatter for ASP.NET 4.5 Web API
These links didn't help me:
way 1,
way 2
Example:
//Model:
public class Group
{
public int Id { get; set; }
public File File { get; set; }
}
//Controller:
[HttpPost]
public void ...
0
votes
1answer
16 views
.Net MVC file upload control in modal popup and save using $.post
I an trying to upload file using modal popup. I couldn't get uploaded file in controller.
I placed file upload control in model popup and used $.post to save that file.
Please suggest me your ...