Tagged Questions
The ASP.NET MVC Framework is an open source web application framework and tooling that implements a version of the model-view-controller (MVC) pattern tailored towards web applications and built upon an ASP.NET technology foundation.
0
votes
0answers
2 views
Issue while returning From Box, when already loged in From another tab
I am working on Box integration with my C# application. This is my work-flow. Users registers to my site then an email is sent to user to create password for Box Account.User creates password in Box. ...
0
votes
0answers
8 views
IEumerable<> in a MVC ViewModel
I've been trying to get a better grasp on Model and ViewModel design. And for most of you out there, this is probably a silly question. For starters, here is my model:
public class Cities
{
...
0
votes
1answer
20 views
Make a “DropDownlist” using class input with a “DropDownlistFor” Statement
I am trying to make a "DropDownlist" using class input with a "DropDownlistFor" Statement.
I had to add "using System.Web.Mvc" to the reference list for a "SelectListItem" to function properly.
...
0
votes
0answers
14 views
HttpContext.Current.User.Identity.IsAuthenticated = false always in MVC4 in windows authentication mode is not working
I am trying to do customAuthorization in MVC when the authentication mode is "windows"
public override void OnAuthorization(AuthorizationContext filterContext)
{
#region if
...
0
votes
1answer
26 views
Getting HTML Textbox value using Razor - MVC
I currently have table that displays a list of all of the issues. I added PagedList.MVC to the application as well as a jquery filterTable the issue is that when I click on a different page using the ...
0
votes
3answers
23 views
mvc slideshow using folders
I'm brand new to MVC so I figured I would start a simple project that would display a slideshow of images from a series of folders on my local machine to help me learn. I'm looking for help just to ...
1
vote
3answers
37 views
ASP.NET MVC 5 Attribute Routing
I'm trying to use route attributes in MVC 5. I created an empty MVC project in Visual Studio to experiment with and so far I can't get the routing to work. I'm using this page as a reference. I have ...
0
votes
0answers
5 views
Using Spire.doc, Spire.xls and Spire.Presentation in same project
It's possible to use the 3 products in the same project?
Just downloaded the free versions of each and the Spire.PDF.dll version are different and causes error "System.IO.FileLoadException: Could not ...
1
vote
0answers
26 views
Javascript - When a button is clicked, redirect to Login page if not authenticated
I inherited an MVC app with jQuery and Kendo. Most of the controller actions have the [Authorize] attribute and it handles the redirection to the Login page nicely if the user is not already ...
0
votes
0answers
19 views
ASP.NET MVC DropDownList displaying “Id” instead of “Description”
I've been doing some tutorials in ASP.NET MVC and decided to try something I hadn't seen yet.
I have two tables: Patient and Classification. I want to be able to create a new Classification, then ...
0
votes
1answer
11 views
_Layout and Partial View
Using an MVC5 application and I am trying to load a model within a partial view that is also within the _layout page. This doesn't seem to work as it conflicts with other models loaded up in different ...
-1
votes
1answer
22 views
Asp.net mvc ajax call not working
my url is look like :
localhost:1336/PartPicker/Part/Mobile/list_view
i want ajax post request. But ajax request is not wroking
my controller action code
public JsonResult getProduct(String ...
0
votes
0answers
10 views
Using webforms master page in MVC (performing master page button postback doesn't run click handler)
I finally got my existing webforms site to have some integrated MVC pages while using the existing master page. I basically used the second option from this: Scott Hanselman: Mixing Razor views and ...
0
votes
1answer
28 views
Validation Errors with string contain html tags - MVC
I keep getting an error saying "A potentially dangerous Request.Form value was detected from the client". It is because I have html styling tags within the string which I use to display the string ...
0
votes
0answers
4 views
Add a custom button to Telerik MVC grid footer
I want to add a custom button on the footer of a telerik mvc grid. how do i achieve it?
Please note, my application contains lot of grids across the web pages. i need it to be more generic like how ...
0
votes
1answer
33 views
Using the DbContext from an MVC project in a C# Windows Forms Application?
I have two projects in my solution. The first is an MVC project called EXSIS and the second is a C# Windows Forms Application called Backend. EXSIS contains the database file exsisDB.mdf and was built ...
0
votes
0answers
7 views
entity framework 6 mvc 5 smalldatetime not generated correctly
I'm using Entity Framework 6.1.1 Code First and ASP.NET MVC 5.2 and I've just noticed an issue when I generate a migration. I have a number of fields with the data annotations like this:
...
0
votes
0answers
36 views
Asp.net MVC retrieve information from server with Javascript
I'm working on a Asp.net Razor application.
I have a table on my page, and have some names of people as the y_axis for this table.
I have incorporated a tool tip (Tooltipster library) for these ...
0
votes
1answer
39 views
ASP.net MVC5 - For loop posts single item but not the collection
I am creating a new recipe entry form and I am finding two interesting problems:
The Ingredient does not post to the recipe collection, and
The Form will only post a single ingredient and sends null ...
0
votes
0answers
23 views
MVC display selected item within a list
I have a view where I am trying to display a list of sports. Within the list of sports is a list of markets, and within the list of markets is a list of selections. I am currently able to display the ...
0
votes
0answers
20 views
Binding a List of Strings to MVC Controller via form submission
I'd like to allow end users to provide a comma separated string in a text box, and have that string be split on the comma and returned to the controller as a list of strings via a form submission. ...
2
votes
2answers
36 views
MVC Nested Model Collection
I am new to MVC and I am trying to display information from a nested model collection on the page.
so my model is as follow:
public partial class Parent
{
public Parent()
{
...
0
votes
2answers
24 views
How can I check to see if validation was triggered?
I am adding validation for a registration form. Right now, I have this:
<div class="row">
<div class="alert alert-danger">
@Html.ValidationMessageFor(model => ...
0
votes
1answer
20 views
Hide form input fields from URL
I've got a login form with two input fields: username and password.
<form method="get" action="../Main/Index">
<p>
<input type="text" name="username" value="" ...
0
votes
0answers
9 views
The 'Salt' property is deprecated. use the static AntiForgeryConfig.AdditionalDataProvider property
How to use many @Html.AntiForgeryToken() in one page?
I tried to use different strings foreach forger token
@Html.AntiForgeryToken("logoff_forgery") but when I add [ValidateAntiForgeryToken(Salt = ...
0
votes
0answers
11 views
ASP.NET MVC Global Selector Attribute
I use the same action name for both the GET and POST versions of my methods. I'd like to call the GET method even during a postback based on a condition. For example I added the following selector ...
0
votes
1answer
43 views
How can I debug ASP.net unit tests?
I'm trying to unit test some special header handling on an MVC website, but I can't for the life of me get it to even consider starting up the development web server to debug the unit tests.
All the ...
1
vote
2answers
14 views
SPA Refresh page using routing, AngularJS
I have SPA, when I'm using routing and want to refresh a page I get 404 because it Client side routing.
How do I handle this?
Here is my routing:
app.config(function ($routeProvider, ...
0
votes
2answers
24 views
Jquery Ajax and asp.net mvc controller
I am having some trouble with $.post() and my mvc controller.
I have tried a couple of examples on the web and stack overflow like this : How can I post an array of string to ASP.NET MVC Controller ...
0
votes
3answers
29 views
Jquery load does not hit my method
I got this Jquery (thanks user @Saranga) which i supposed to hit my method:
$( ".photography-image" ).click(function() {
e.preventDefault();
$("<div></div>")
...
0
votes
0answers
20 views
How to redirect to view with two forms from an action method?
Action Method called New inside the controller called Advert and its view running well. I just needed to embed another form into the view for image upload:
<form action="/advert/ImageUpload" ...
0
votes
1answer
17 views
How to host ASP.NET MVC 5.1 application on Google App Engine
Not sure even if its possible. I want to host an application developed in C# ASP.NET MVC 5.1 and MSSQL 2008 back-end on Google App engine.
Please let me know how can I do it?
Thanks.
-1
votes
3answers
38 views
client side validation. Prevent posting form
I have some textboxes in my form. Unobtrusive jquery validation works, and makes the boxes the boxes red, when invalid values are entered. However, when I click to submit the form the form is posted ...
0
votes
1answer
22 views
how to upload file in MVC 4
I'm trying to upload file and save its path to database using MVC and knockout js but i'm not able to do this. I try bellow code it's not work controller method not executed. Please help me
View
...
-1
votes
0answers
29 views
calling json URL in MVC 4
i made an ASP.NET WEB API which fetch the detail of customer & nutrient in json format. i deployed my API on IIS & it is working fine. Now i want to use the URL of that API on my MVC ...
0
votes
3answers
28 views
MVC action not getting called
I have only 1 controller and have 1 action only in my example like this:
//
// GET: /Home/
public ActionResult Index(string source,string id)
{
return View();
}
I have 2 routes registered for ...
0
votes
2answers
25 views
AngularJS: Using If condition in text input
I have an input type as text to select dates and I want that Its default value should be the earliest amongst the JSON data having following structure:
testData=
{
"name":"ABC", transactions:[
...
1
vote
2answers
36 views
How to reset a database value after an elapsed time ASP.NET MVC C#
Im stuck as to how to tackle a problem i have come up against. I want the user to change a value that is stored to a database from a dropdown. After an elapsed time (say 1 hour) i want the value to be ...
0
votes
1answer
12 views
Wijmo Grid. Get rownumber for row with matching Id
I have a Wijmo Grid where the first column is Id.
$("#logGrid").wijgrid({
loaded: loadedHandler,
columns: [
{ headerText: "Id", dataType: "string", dataKey: "Id", visible: false },
...
0
votes
1answer
43 views
ASP .NET MVC: Switch users to a subdomain when authenticated
I would like to have a single asp mvc application that runs under www.mysite.com for all guests. Once the user logs into the website I would like to use the subdomain my.mysite.com as the domain they ...
0
votes
0answers
18 views
Is Microsoft Certification 70-583 is still valid, even it was retired? [on hold]
I came to know that Microsoft Certification 70-583 (Designing and Developing Microsoft Azure Applications) is scheduled to retire on July 31, 2014 and it will be replaced by Exam 70-532.
I am planning ...
1
vote
1answer
59 views
MVC 5 IValidateObject not displaying error message?
I am following ScottGus blog here - The Basic requirement I have is that I have two text fields on screen - I want to validate if both of them are blank and Sumite button is pressed I want to display ...
-1
votes
1answer
21 views
how to pass array through javascript to controller
i am having one array in javascript named as checkboxarray which contain some elements which is dynamic.
now i want to pass this array to controller through java script.
my controller name is Test ...
0
votes
0answers
24 views
Twitter Bootstrap 3 container
I've started learning Bootstrap and I'm a bit confused about the container.
Do we create a container and then we embed all our navbars, body etc into it, or do we create a container for each part?
...
0
votes
1answer
10 views
NHibernate QueryOver with WhereRestriction as OR
I have this query but I can't seem to find how I set my WhereRestrictionOn as an OR. Now they function as AND but I want one OR the other.
var privateInfo = Session.QueryOver<ConContact>()
...
0
votes
0answers
22 views
client validation on jquery 2.1.1
I am using MVC5 and am trying to get client validation to trigger rather than doing server trip.The validation works server side but I can't get the client side to trigger using jquery 2.1.1
I am ...
0
votes
1answer
38 views
How to handle Creation & Modified Date in .NET MVC Entity Framework Migration?
How can I use Entity Framework and Migration to add a CreationDate and ModifiedDate to some (not all) of my Model-classes to automatically update the Database, and also automatically update the ...
0
votes
0answers
29 views
how to keep chosen value after redirect to action?
I have an opening page which lets user to enter SupervisorList page
<li>
<a ...
0
votes
1answer
29 views
Get access to the URL's being used in System.Web.Optimization
Background: I'm using the HTML 5 Offline App Cache and dynamically building the manifest file. Basically, the manifest file needs to list each of the static files that your page will request. Works ...
0
votes
2answers
39 views
Pass object to partial view
I have this controller which fetches an object that I would like to render in a partial view:
public ActionResult EditPhoto(string id)
{
var photo = RavenSession.Load<ContentPage>(id);
...