Razor is a template language used by ASP.NET Web Pages and ASP.NET MVC (since version 3). It supports seamless transitions between HTML markup and C# or VB code. Transitions between markup and code are indicated by the "@" sign.

learn more… | top users | synonyms (6)

-2
votes
1answer
8 views

asp.net razor query if else condition

I have a query which brings picture from database based on id which looks like this var selectphotos = "Select * from ItemPhotos where ItemID= @0"; I want to hide image div if that query has 0 ...
0
votes
0answers
26 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
10 views

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

I am trying to use MetadataType to add Data Validation to my entities. I am using Dapper for my database operations and I am using the asp.net wizard scenario outlined here ...
0
votes
2answers
6 views

How to add senders name while sending a mail using WebMail

My current code is: WebMail.SmtpServer = "relay-hosting.secureserver.net"; WebMail.From = "[email protected]"; While I send a mail using above code the senders name at the receivers side is ...
0
votes
0answers
20 views

Asp Mvc 4 filter form return null to controller

I am developing ASP MVC 4 web application where user can filter items by specific feature. I am using form in my View however on form submit null is passed to controller Here are the code snippets ...
0
votes
1answer
22 views

Why is my second “timepicker” not being populated?

This question is related to, but different from, this one: How can I add Seconds to my "timepicker"? I'm using virtually identical jQuery code for two pairs of text input controls (a ...
0
votes
2answers
34 views

How can I add Seconds to my “timepicker”?

I'm using the jQuery-UI datepicker in this way: var datepickerOpts = { changeMonth: true, changeYear: true, showButtonPanel: true, showWeek: true, onClose: function(dateText, ...
0
votes
0answers
17 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
1answer
34 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 ...
2
votes
1answer
35 views

Razor MVC, where to put global variables that's accessible across master page, partiview and view?

Hello Razor MVC Gurus: Newbie question. Background. I have a custom IIdentity that is set in an HttpModule before it gets to controller & views. To use it, i have to do MyIdentity ...
0
votes
1answer
54 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
30 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, ...
1
vote
1answer
15 views

MVC4 Formcollection not refreshing?

I have a model with a boolean property. The corresponding view looks like this: @Html.CheckBoxFor(model => model.TermsAccepted) @Html.ValidationMessageFor(model => model.TermsAccepted) In my ...
0
votes
1answer
24 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
0answers
11 views

Copy Razor-Views for Self-hosting NancyFx?

I started out with a simple MVC-site using NancyFx with Razor-views (.cshtml) and Nancy.Hosting.Aspnet, using IIS Express. Now I adapted the project to a self-hosting service using Nancy.Hosting.Self ...

1 2 3 4 5 617
15 30 50 per page