0
votes
0answers
4 views

error CS0234: The type or namespace name 'Test' does not exist in the namespace 'SimpleDBAccess.Models'

I'm absolutely new at ASP.NET and MVC and so on. I'm trying to list in a web page the content of a SQL server database. In that way, i've created a simple MVC4 project with the followinf Index.aspx : ...
3
votes
0answers
14 views

ASP.Net MVC C# with Toastr not minifing javascript

I'm using ASP.Net MVC 4 - and attempting to use Toastr too. I installed it via NuGet - and it works in development, however, when I publish, my Javascript "bundle" reports: /* Minification failed. ...
0
votes
1answer
6 views

MVC4 bind List of objects to ASP GridView

I have started to create my first and small MVC4 website. On the home page I would like to have several asp:GridView controls. In the HomeController / ActionIndex method I managed to collect the data ...
1
vote
1answer
21 views

How to delete all the login/membership information?

There is an asp.net mvc 4 website. The users want to re-start the web application from scratch. What's the best way to clear all the login/membership information. Just use Sql server management studio ...
0
votes
1answer
30 views

ASP.NET MVC application: Possible to expose only some controller actions

Is it possible through web.config or similar to only allow\disallow access to certain controllers or actions on an ASP.NET MVC2 application? I don't mean through the Authorize attribute, I mean ...
0
votes
1answer
39 views

ASP.NET exception: The value's length for key 'initial catalog' exceeds it's limit of '128'

I am self-learning ASP.NET MVC4, and setting up a simple website, I get the error as soon as I hit the register or login button on the site: The value's length for key 'initial catalog' exceeds ...
0
votes
1answer
23 views

Asp.net MVC + dropzoneJS file upload

I use DropzoneJS with MVC. The file uploads fine, but action will not display another view, neither will display another view after redirected to another action. Just stays on the same view it was ...
2
votes
1answer
23 views

Is there an ASP.NET data type equivalent to the XML data type in SQL Server?

I need to create an app where a user uploads an xml document and that document gets stored in a database column of type "xml". Does anyone know a class equivalent to it?
0
votes
3answers
35 views

Custom membership provider in ASP.NET

I am implementing my own membership provider.I used Repository pattern. public interface IMembershipService: IDisposable { void CreateUser(string username, string password, string email, string ...
1
vote
2answers
35 views

Hosting site on http and https

I want to host my ASP.NET MVC website with both http and https bindings. But only few paths should be available via http, where as all paths should be available via https. e.g. My application exposes ...
1
vote
1answer
31 views

ASP.NET MVC 4 - Alternative Render based on request

Trying to implement a system whereby a developer would create a cshtml Razor view as per usual (e.g. a series of @Html.EditorFor(t=>t.MyProperty) calls interspersed with markup etc.) but based on ...
0
votes
2answers
48 views

ASP.NET MVC: Cannot use a lambda expression as an argument to a dynamically dispatched operation

I have a ASP.NET MVC4 Application. My view get a List from my controller. I want to select these list with lambda expression but I get the following error: Cannot use a lambda expression as an ...
0
votes
0answers
9 views

FluentValidation: arguments in the Validator constructor

I am using the FluentValidation package in my ASP.net project. I would like to know how to pass a parameter to the Validator constructor. Here is what I would like to do with my validator. Notice the ...
1
vote
1answer
36 views

Azure ACS Set Up in C#

I am looking at several examples for using ACS, and decidedly they do make me feel stupid. I looked at the tutorial online it seems like all I need was the following line in the config: ...
0
votes
0answers
19 views

ASP NEt Web api Message Handler getting model

Am am building ASP.NET WEB API for one of my projects where I have generic request message which contains some generic properties. I want to build DelegatingHandler inside which I will be able to get ...
0
votes
1answer
23 views

iPhone and asp.NET MVC File Upload with URL Parameter

this is going to be a question about sending data from the iPhone to a MVC 3 function. To get into the topic what I'm already doing and what is working, just to see the style how I'm implementing ...
3
votes
1answer
81 views

my action is called twice

I have an action to return a page's PageRank. When I debug my site and call that action first my action is called with the url and it return the page's PR and then it's called again with no url and ...
2
votes
0answers
57 views

ASP.NET Session state lost after exception

I've usually avoided in-proc session state, until this recent project. I think I have a problem where the state is lost after an unhandled exception occurs. This in itself is odd, since exceptions in ...
0
votes
1answer
38 views

Validation Summary working but Individual Validation Messages are Not working

Before I got into the details, this is what I have Environment : VS 2008 with ASP.NET MVC 2 Base Model Code [DisplayName("Current Application Status")] [Required(ErrorMessage = "Current ...
0
votes
0answers
49 views

Grant ASP.NET MVC 3 website write access to ~/Content/uploads folder

I have an ASP.NET MVC 3 website that runs on the company intranet to which I want to add a page that can upload files to the server. I am running the site on Windows Server 2012 with IIS 8. IIS ...
0
votes
0answers
11 views

passing values to nlog custom target

I have created a custom nLog target and it is working except for one thing. I want to pass the logged in person name to the target, I have created a property called ApplicationUser which will pick up ...
0
votes
2answers
34 views

taking id and value from a lot of radiobutton by post

In the view I have a lot of RadioButtons and the id is the unique for each one. when user choose one of those in controller I would like to take the ID and VALUE how i can do that.... i try with ...
-1
votes
1answer
33 views

Asp.net - Mvc Get link redirected from a another link [closed]

I want to capture a image link from a link/ For example: In Html file response, I cature a link that looks like http://images1.tuoitre.vn/tianyon/ImageView.aspx?ThumbnailID=639445 it display an ...
0
votes
2answers
53 views

ASP.NET MVC disable dropdownlist on page load

I'm using ASP.NET MVC 4 and jQuery to achieve this. What I'm trying to do is to disable or enable a dropdownlist based on if a checkbox is checked or not. I can get this working, however I can't ...
0
votes
0answers
20 views

Convert windows path to web path in asp.net mvc

I used HttpContext.Current.Server.MapPath("~/Images/abc.jpg") to get the Windows Path for a file in my web application. Now I want the reverse. From the windows path that I got, I want to get the ...
2
votes
1answer
37 views

The call is ambiguous between two methods or properties

I use mvc3/razor,This code is for integrating openID. When I run the program it is working fine,But When i see the code, red lines gives this popuperror. The call is ambiguous between two methods or ...
0
votes
2answers
39 views

asp.net mvc convert(encode) excel file to base64 string

i need to pick up an excel file form my asp.net mvc project folder and encode it in base64 string. mine code right now: string base64 = String.Empty; var pathName = ...
0
votes
0answers
39 views

Why Page.GetRouteUrl returns null?

I'm trying implement Url rewriting on my site using Routing, but somehow it's not working. My code is very simple: in Global.asax: void Application_Start(object sender, EventArgs e) { ...
-5
votes
2answers
31 views

How to refresh a partial view of main view after closing pop up in MVC 4? [closed]

How to refresh a partial view of main view after closing pop up in MVC 4 ? Main view displays a popup. After doing update I want to close this popup and refresh the partial view, but not the main ...
0
votes
1answer
38 views

Windows authentication doesn't works when I run project from Visual Studio

Windows authentication works good when I host my ASP.NET MVC project on IIS. But if I run this from Visual Studio - it doesn't. Here is my Web.config: <authentication mode="Windows" /> ...
0
votes
1answer
30 views

Custom configuation file issue in asp.net

I have got below sample code in web.config file. <configuration> <configSections> <section name="secureAppSettings" type="System.Configuration.NameValueSectionHandler, ...
0
votes
2answers
53 views

Getting a null exception as model in razor

i have an error's view in my asp.net mvc4 application like this: @model System.Web.Mvc.HandleErrorInfo @{ ViewBag.Title = "Erreur"; } <p>Take it easy</p> <hgroup class="title"> ...
0
votes
1answer
36 views

Personalize the error view in razor

I have an Asp.net mvc4 application, in which I would like to personalize the exception page <customErrors mode="On" defaultRedirect="~/Views/Shared/Error.cshtml" ></customErrors> the ...
-1
votes
2answers
34 views

ASP.Net MVC Bundler not including my .min file in Release

I have an issue with the mvc4 bundler not including a file with extension .min.js. In my Scripts folder i have two files: bootstrap.js, bootstrap.min.js In my BundleConfig class, I declare #if ...
1
vote
1answer
44 views

How to pass IEnumerable list to controller in MVC including checkbox state?

I have an mvc application in which I am using a model like this: public class BlockedIPViewModel { public string IP { get; set; } public int ID { get; set; } public bool Checked { get; ...
0
votes
1answer
18 views

Hiding http file extension without using MVC controller

I am using basic asp.net web application project template, because I want to move away from MVC into SPA. Most of my pages will just be basic html files that will interact with the server through ...
0
votes
2answers
63 views

Why the “FirstOrDefault()” is not required in the <th> rasor code?

I'm trying to build a partial view which can add a record at the top and show the list of added items. I have the following code. Why it's not necessary to add FirstOrDefault() in the <th> part ...
1
vote
1answer
12 views

CultureAndRegionInfoBuilder registration

I have a web application that is very much driven by culture. I have created some custom cultures and registered them using CultureAndRegionInfoBuilder Once registered do I need to register ...
0
votes
1answer
43 views

Exact same HTTP request results in text/html or application/json depending on server

I have a very simple JsonResult method on one of my controllers: [AjaxErrorHandler] public JsonResult ApplyBasic(ApplyBasicModel applyBasicModel) { if (ModelState.IsValid) { return ...
2
votes
2answers
98 views

Html.dropdownlist does not display the default/selected value in the dropdown field

I have a table with various rows and each row corresponds to an ID. For every row, I have EDIT option which when selected should enable the user to look at the default values corresponding to that ID ...
0
votes
1answer
52 views

Input validation for .NET web api in Http Get request

I am developing a Restful service using .net web API. There are a few posts about input validation for the post request using model validation. However, I am wondering what is the best practice of ...
0
votes
1answer
27 views

How do I render a partial view based on the list item a user clicked on?

I have a HomePageViewModel that takes various models and shows a summary view on the home page. I'd like to filter the Announcements model based on the result of a drop down list, which I'm rendering ...
0
votes
0answers
17 views

Where will windows based authentication for my asp.net MVC web application, fail to allow users from accessing the web application

My requirements are:- To build an asp.net MVC web application to use windows based authentication, since all the users which will be accessing the application are our internal employees, and they ...
-1
votes
3answers
67 views

MVC Dropdownlistfor<>

I am started project in MVC. i am new for this MVC asp.net. I want to add drop down list box like i used to add in asp.net. code glimpses in asp.net for Dropdownlist box <asp:Dropdownlist ...
0
votes
1answer
63 views

Send from view to controller with Ajax

I have a question about send data from a view to a controller with ajax. This is my View: @model GDMfrontEnd.Models.DeliverableViewModel @{ ViewBag.Title = "Create"; } <div class="row"> ...
1
vote
1answer
36 views

ASP.NET MVC - Check if request comes from another action

Is there a simple way to check if a request comes from an action inside my app? I'm building the email confirmation page on a site I'm working on, and I'd like to show different texts on different ...
1
vote
2answers
47 views

@Ajax.ActionLink-Resource can not found error

when the code executes the @Ajax.ActionLink, it said "Resource can not found error". I use @Ajax.ActionLink in a view and tried to update a link information. The code is <div id ="rsvpmsg"> ...
0
votes
1answer
37 views

Send value from view to action in controller

I want to send my itemID from my Detail View to an action method in my controller. This is my view: @model IEnumerable<GDMfrontEnd.Models.items> @{ ViewBag.Title = "Detail"; } ...
0
votes
0answers
38 views

Html.RadioButtonFor without radiobutton

I want to a form with radiobuttons in it. Here you can see what I mean: As you can see you have the options "Graphic Design, Photo Design, ..". What I want to do is when you click on one of them, ...
0
votes
1answer
25 views

Change values row from mysql database instead of adding

I want to change the properties of a user when they edit them in a form. This is my view: @using (Html.BeginForm("Manage", "Account")) { @Html.AntiForgeryToken() @Html.ValidationSummary() ...

1 2 3 4 5 198
15 30 50 per page