Tag: r

51 votes
9 answers
3.1K views
Returning a file to View/Download in ASP.NET MVC

I'm encountering a problem sending files stored in a database back to the user in ASP.NET MVC. What I wan

avatar
Roger
0 1 0 9
asked 07 September, 2021
66 votes
9 answers
1.1K views
How to pass json POST data to Web API method as an object?

ASP.NET MVC4 Web API application defines post method to save customer. Customer is passed in json format in PO

avatar
Wilfredo
0 1 0 9
asked 07 September, 2021
64 votes
6 answers
336 views
HTML.ActionLink vs Url.Action in ASP.NET Razor

Is there any difference between HTML.ActionLink vs Url.Action or they are just two ways of doing the same thin

avatar
Robt
0 1 0 9
asked 07 September, 2021
65 votes
8 answers
2.4K views
How to use dashes in HTML-5 data-* attributes in ASP.NET MVC

I am trying to use HTML5 data- attributes in my ASP.NET MVC 1 project. (I am a C# and ASP.NET MVC newbie.) &

avatar
Charis
0 1 0 9
asked 07 September, 2021
62 votes
18 answers
882 views
Can you overload controller methods in ASP.NET MVC?

I'm curious to see if you can overload controller methods in ASP.NET MVC. Whenever I try, I get the erro

avatar
Forrest
0 1 0 9
asked 07 September, 2021
55 votes
17 answers
1.9K views
Validation failed for one or more entities while saving changes to SQL Server Database using Entity Framework

I want to save my Edit to Database and I am using Entity FrameWork Code-First in ASP.NET MVC 3 / C# but I am g

avatar
Scot
0 1 0 9
asked 07 September, 2021
68 votes
6 answers
1.7K views
ASP.NET MVC View Engine Comparison

I've been searching on SO & Google for a breakdown of the various View Engines available for ASP.NET

avatar
Denese
0 1 0 9
asked 07 September, 2021
51 votes
24 answers
3.1K views
Injecting content into specific sections from a partial view ASP.NET MVC 3 with Razor View Engine

I have this section defined in my _Layout.cshtml @RenderSection("Scripts", false) I can easily use it from

avatar
Wilber
0 1 0 9
asked 07 September, 2021
58 votes
10 answers
1K views
How to get current page URL in MVC 3

I am using the Facebook comments plugin on a blog I am building. It has some FBXML tags that are interpreted b

avatar
Shantay
0 1 0 9
asked 07 September, 2021
55 votes
7 answers
2.3K views
How to declare a local variable in Razor?

I am developing a web application in asp.net mvc 3. I am very new to it. In a view using razor, I'd like

avatar
Frederick
0 1 0 9
asked 07 September, 2021
48 votes
8 answers
2.6K views
Styles.Render in MVC4

In a .NET MVC4 project how does @Styles.Render works? I mean, in @Styles.Render("~/Content/css") which file i

avatar
Lynette
0 1 0 9
asked 07 September, 2021
55 votes
10 answers
1.7K views
Which version of MVC am I using?

I can't find it for some reason, feeling a little dumb. How do I know? I'm using .net 4 with VS2010.

avatar
Bryan
0 1 0 9
asked 07 September, 2021
60 votes
5 answers
560 views
Why is JsonRequestBehavior needed?

Why is Json Request Behavior needed? If I want to restrict the HttpGet requests to my action I can decorate t

avatar
Sena
0 1 0 9
asked 07 September, 2021
52 votes
7 answers
887 views
Writing/outputting HTML strings unescaped

I've got safe/sanitized HTML saved in a DB table. How can I have this HTML content written out in a Razo

avatar
Luis
0 1 0 9
asked 07 September, 2021
53 votes
12 answers
2.4K views
Using Razor within JavaScript

Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (cshtml)? I a

avatar
Don
0 1 0 9
asked 07 September, 2021
54 votes
19 answers
2K views
Can an ASP.NET MVC controller return an Image?

Can I create a Controller that simply returns an image asset? I would like to route this logic through a cont

avatar
Basil
0 1 0 9
asked 07 September, 2021
52 votes
15 answers
2.1K views
How to render an ASP.NET MVC view as a string?

I want to output two different views (one as a string that will be sent as an email), and the other the page d

avatar
Keith
0 1 0 9
asked 07 September, 2021
63 votes
4 answers
2.9K views
What is the difference between 'classic' and 'integrated' pipeline mode in IIS7?

I was deploying an ASP.NET MVC application last night, and found out that it is less work to deploy with IIS7

avatar
Trudy
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
2.3K views
ReSharper "Cannot resolve symbol" even when project builds

My Tools: Visual Studio 2012 Ultimate + Update 1 ReSharper v7.1.25.234 My Solution Build Status: Build Succ

avatar
User demo
0 1 0 9
asked 07 September, 2021
52 votes
30 answers
2.1K views
JQuery - $ is not defined

I have a simple jquery click event <script type="text/javascript"> $(function() { $('#p

avatar
Deedee
0 1 0 9
asked 07 September, 2021