ASP.NET MVC 3 is the third major version of Model-View-Controller extension for developing web applications in a .NET framework.

learn more… | top users | synonyms (3)

0
votes
2answers
44 views

Does ASP.NET MVC razor view engine encode HTML by default?

Does ASP.NET MVC razor view engine encode HTML by default? Or do we have to use the htmlhelpers for html encoding the data.
0
votes
0answers
12 views

How to set Jeditable Text maxlength?

I am trying to set the maxlength on Textbox on JEditable Datatable. I have 10 different columns off which 6 are Editable Columns. and each maxlength is different. Any help would be greatly ...
0
votes
1answer
29 views

jQuery dialog partial form submit validation

I have the following partial view (I have removed some of the formatting just to keep it simple on this forum). My form tag is on the parent page, and the items on the dialog are a part of that form. ...
1
vote
2answers
39 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
0answers
38 views

How to change the display name for a property in the controller?

I'm working with ASP.NET MVC4. I am looking to change the display name of a property based on some other value retrieved from a database, so that when I call @Html.LabelFor() in my view, the correct ...
0
votes
0answers
24 views

Client side validation seems to fire even when disabled under ASP.Net MVC3

We have an ASP.Net MVC3 app which is to be used in the UK and Germany. Some of the edit screens involve editing floating point values. These are presented using @Html.EditorFor(m => ...
0
votes
2answers
24 views

Whether I am writing the correct test method in Unit Test?

I am develeloping MVC application and writing the unit test. I am confused about the coding pattern/process of unit test. I am writing the unit test but I am not aware of , whether I am writing in ...
0
votes
1answer
23 views

Uploading image from razor view without @HTML.BeginForm

I'm working on ASP.NET MVC3 application. My main view have only one @HTML.BeginForm where is almost all my markup. Partially this is because I want to submit all the information at once, I have text, ...
0
votes
0answers
16 views

List HttpPostedFileBase with knockout

I have a create view with a form. It has an input text (enviroment), input file (logo) drop down list (platforms) and list of viewmodel (days). This is working OK. Now I want to add a "dynamic ...
0
votes
0answers
15 views

How to update entities automatically when the underlying database tables/stored procedures have been changed

Is it possible to update the edmx model automatically or make the entity model notify (throw error) if the underlying tables or stored procedures have been changed by db admin.I have created entities ...
0
votes
2answers
15 views

ViewBag property changed to object type

In my controller i put model object to viewbag as shown in the below: ViewBag.fileModel = new ViewFileModel(id) public class ViewFileModel { public Employee Employee { get; set; } ...
0
votes
1answer
38 views

String value with double quote in C#

I was trying to do autocomplete for my input box. When user start typing "I, then I should exactly search the keyword what user has typed ("I). When keys pressed, I was getting the string value as ...
0
votes
0answers
12 views

Foreign key error “RelationshipManager.GetRelatedReference” in join statement. Linq with MVC3

This is a part of my database: I'm trying to get all groups that study a subject which is assigned to a specific exam: ExamView.GrpLst = (from ex in en.Exam join ...
0
votes
1answer
30 views

Hide/Show HTML.ActionLink using jQuery

I am working on ASP.NET MVC3 application. In my razor view I use @HTML.ActionLink to implement delete functionality for my custom image gallery. However when I show enlarged image I want to hide this ...
0
votes
2answers
24 views

How to open form in same window of mvc3 view?

By using the following code,I able to open it in new window.but i want to open in same window or tab @Html.ActionLink( "Edit", "Edit", new { id=item.studentID },new {target="_blank"})
0
votes
1answer
34 views

Use jQuery toggleClass() when image inside a span tag is clicked

I'm working on an ASP.NET MVC3 project using Razor. I'm trying to implement a simple image gallery. My images are inside span tags and when an image is clicked I want to toggle the class of the span ...
0
votes
1answer
31 views

Browse files system and show image in span using jQuery

I am working on ASP.NET MVC3 application using razor view. I'm trying to create a simple custom image gallery with delete/upload options. All the logic is inside a @HTML.BeginForm so data is submitted ...
0
votes
0answers
11 views

MVC3 Resource Files -Basics

I am very much new to MVC3 and wanted to know about Resource files and their usage in MVC3. Can any one give me a brief idea about basics of Resource files and their usage in MVC3 Also help me with ...
1
vote
1answer
36 views

How to avoid string corruption on formatting razor views

In Visual Studio Express For Web 2012 if razor view is formatted, formatter adds extra spaces to end of javascript string. This causes invalid data to be passed. Before formatting: @if ...
0
votes
1answer
22 views

Twitch TV OAuth Login In C#

I am trying to connect a twitch TV account to a user profile on my website and I am getting a 403 Forbidden error. I am trying to use the Authorization Code Flow specified here: ...
0
votes
0answers
13 views

Getting DIV with specific ID to the top of TinyMCE editor

I am using TinyMCE as HTML editor with Asp.net and MVC3. I have Html something like this <html> <div id = "A1" ........../> <div id = "A1" ........../> <div id = "A1" ...
0
votes
0answers
23 views

Kendo Grid, displaying a list with client template

I am trying to get a Kendo grid to display a list of values using a for loop in the client template except it keeps crashing the grid when I try it. The grid is below: @( ...
0
votes
3answers
56 views

Data annotations in ASP.NET MVC

ASP.NET MVC provides data annotations features. So if we specify the required decorators in the mdoels the validation is taken care of. If so then why should we still be checking for ...
0
votes
2answers
24 views

How to debug AutoMapper “Missing type map configuration or unsupported mapping” error

I have seen plenty of examples of this error occuring, for a wide variety of causes and I have gone through all the causes I can see, but still i get the error, so I am wondering if some one can give ...
1
vote
1answer
38 views

How to call a hash algorithm in an ActionResult

Currently I'm seeking for the possibility for hashing a password in an ActionResult. To be specific, I want to call my SHA512 method in the public ActionResult Edit(User user) to hash the password if ...
0
votes
1answer
39 views

How to send model data from one controller to another?

[HttpGet] public ActionResult BookingStep1() { return View(new BookingMainApplicantInfo()); } [HttpPost] public ActionResult ...
0
votes
1answer
37 views

Want to understand the concept of ActionResult in MVC.

I am new to MVC development. I am trying to figure out about ActionResult. I have go to many links on this forum itself... but I don't think anyone give clear answer... I have read many ...
0
votes
1answer
13 views

Error occurs in unit test in details method in MVC App

I am developing an MVC application, and trying to create a unit test in it. I have written the unit test as shown below. [TestMethod] public void Company_Details2() { ...
1
vote
1answer
54 views

How to pass values from View to a Controller Action parameter? MVC3

I apologize if asking some questions these days. But appreciate for all kind helps. Actually, I need to pass data from View to Controller using MVC3 Razor. Here is the View Code: ...
1
vote
1answer
33 views

Radio Button Group in ASP.NET MVC3

I am having a field of Boolean in Model named Child_With_Bed . Now, I want radio button group in which yes = true and no = false. So when I select it Child_With_Bed's value is set. I tried below ...
0
votes
0answers
23 views

MVC RedirectToAction not working in Azure emulator

When running my MVC 3 project in using the azure emulator, I use this method call to redirect the browser to another URL: int id = 4; // could be any number return this.RedirectToAction("Index", ...
-1
votes
0answers
20 views

MVC3 config RouteCollection a request to a error page [closed]

I have some zip and rar file in my iis server root,I do not want any body to visit it and I can not manage the iis config ,how can I config my RouteCollection a request to a error page in my code; ...
0
votes
2answers
37 views

MVC3 asp.net error: Value cannot be null. Parameter name: items on dropdownlist

I am getting a dump ONLY in the server and not in my local system when trying to post the data. There is a page which submits some value to the database. I have also modeled the dropdown in the page ...
0
votes
1answer
43 views

ASP.Net MVC dynamically switching Views

I have an ASP.Net MVC 4 application where the user can choose a theme or a design of for their hosted one-page site (within this application). At first, I thought to do this with the built-in Areas ...
0
votes
0answers
51 views
+50

Client side form validation is not working for jquery wizard using MetadataType

Here is a weird one. I am using MetadataType to provide my entities with validation capabilities for two separate entities. As a caveat, I am using a client-side wizard using unobtrusive validation ...
0
votes
4answers
32 views

Get first and second td element in row

I have an ajax call attached to the click event of a pic inside a table row. Once the pic is clicked and the click event initiated, I need to grab the first and second td elements from that row. I'm ...
0
votes
0answers
24 views

MVC3 Razor HTML.DropDownList calculated field

I want to calculate two value from two dropdownlist in MVC3 .Like I have MonthlyFee dropdownlist and ExamFee dropdownlist.I had taken data from another field with ViewBag and take data into these ...
0
votes
0answers
35 views

How to detect if a check box is selected using MVC3 Razor

As I am new to MVC framework, I have been spending a couple of hours to generate a check box list in a View file. Finally, I could figure it out well. Here is my code: @foreach (var item in ...
0
votes
1answer
44 views

Html.Dropdownlist selected value is not posted back to the Controller from view

I am trying to have a dropdownlist on Create.chtml where a user can select a 'NAME' from the dropdownlist and the corresponding value (ID) should be sent back to controller to add it to the database ...
1
vote
2answers
38 views

Upload multiple files where upload has ID

I have a page which has multiple file upload inputs whcih have ID's and Names relevant to the document type being uploaded which look like: <input type="file" name="postedFile_37" id="37"> ...
0
votes
1answer
60 views

Razor/MVC 3 Entity Framework Error Regarding Primary Key

I'm using VS 2010 with Razor/MVC 3 to create a form where User 1 submits information to a database using RequestQueue Model (this is just a queue table). User 2 then pulls this information, approves ...
1
vote
2answers
35 views

Call controller action with specified params

Continuing study Razor and web development at all (I'm C# desktop dev.). Trying to find easiest way to call action on controller with specified params by pressing submit input, but WITHOUT AJAX (yea, ...
0
votes
1answer
18 views

Set the min date of Telerik Datepicker on onChange event of another Telerik datepicker in javascript

I am doing project in ASP.NET MVC3 with C#. I am using telerik Datepicker. On change event of One datepicker, I want to set minDate of another datepicker. and wants to do this in javascript. I ...
0
votes
2answers
23 views

Error when connecting to database in unit test

I am developing an ASP.NET MVC application. The application runs perfectly. I can view, add, update and delete records, but when I run the unit tests, it shows an error on every test method. The ...
0
votes
2answers
16 views

Modal dialog missing image on form submit, IE9+

This issue is driving me mad. So I've got a modal dialog. <div class="modal"> <img src="...."/> </div> Instanciated thus: $(".modal").dialog({ resizable: false, ...
0
votes
1answer
18 views

How to use google docviewer in an MVC application to read doc files?

How to use google docviewer in an MVC application to read doc files? <iframe ...
0
votes
1answer
27 views

Pass model to Controller from jquery ajax

How can I pass model to jquery ajax my code id '@Model' is the model on the view.i need to pass this model to controller which accept argument of type login model. $('#reject1').click( function() { ...
0
votes
2answers
32 views

Change Format of date in javascript

I am doing a project in ASP.NET , c#. I have .aspx view in which i took a datpicker for approval Date. I am fetching value of datepicker on OnChange event. My datepicker in .aspx view look like: ...
1
vote
1answer
14 views

TextBoxFor character encoding (Scandinavian letters)

I'm binding a Model ti editing on an MVC view using TextBoxFor: @Html.TextBoxFor(m => m.Company) assuming that the company name is Andenæs (or any scandvian name like Lønø), the TextBoxFor ...
1
vote
1answer
28 views

MVC3 boolean editor template with multiple controls for the same property

I'm using c#, MVC3, Razor and Zurb Foundation 4. I have a custom editor template for boolean values that will show different UI for different input devices. (visibility is controlled by Foundation's ...

1 2 3 4 5 686
15 30 50 per page