Skip to main content

Questions tagged [razor]

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.

1 vote
1 answer
133 views

Display a table with exchange rate data

I have created a code that displays a table with exchange rate data. Have I used loops and conditions (if else) in a good way? ...
mariuszKen's user avatar
5 votes
1 answer
121 views

Display all files in a folder (object) along with nested subdirectories part 2

Previous post: Display all files in a folder (object) along with nested subdirectories Task: Given a main directory/folder, list all the files from it and if this directory contains nested sub-...
Alexander Lawaetz's user avatar
4 votes
1 answer
577 views

Display all files in a folder (object) along with nested subdirectories

Follow-up question: Display all files in a folder (object) along with nested subdirectories part 2 Task: Given a main directory/folder, list all the files from it and if this directory have other ...
Alexander Lawaetz's user avatar
3 votes
1 answer
2k views

Notification system

I would like to implement a mail notification system Notification.cs ...
user avatar
4 votes
2 answers
8k views

Handing "Others" option in dropdown in ASP.Net MVC 5

Business Logic I have a company referral form, and in that form I have dropdown to select from a company list. But when a company is not found in the dropdown, the user can select option as "others", ...
Unbreakable's user avatar
3 votes
1 answer
16k views

Display a dropdown based on another dropdown change

I have a dropdown and when that dropdown changes I want to display/render another dropdown. Can someone help me improve it? So, a person requests for getting referred in a company for a job. When ...
Unbreakable's user avatar
6 votes
2 answers
7k views

"Forgot password" functionality

I want to implement the "forgot password" functionality in Asp.Net MVC 5. Here is the code flow: Take user email ID Let the user enter the token received in his email inbox If the token matches then ...
Unbreakable's user avatar
3 votes
2 answers
183 views

Submitting a form

I am using ASP.NET core entity framework. I am using an input submit button to call a method that has a variable attached to it. I am wondering if there is a way to improve my code. Here is my ...
Aaron's user avatar
  • 965
3 votes
1 answer
87 views

Website to Track Project's Progress

This ASP.NET MVC website is for my professor to track my progress on my Checkers app. This is the first time I have build an ASP.NET website entirely on my own, and I would like a review to make sure ...
user avatar
3 votes
2 answers
205 views

User can add and delete customers

I am using asp.net core entitiy framework. The page displays the customers. The user can add new customers or delete existing ones. I am looking for ways to improve my code. Here is my cshtml page ...
Aaron's user avatar
  • 965
1 vote
1 answer
719 views

Update data in partial view

I have partial view which update data on server. Partial view contains list of configurations (can be check box or text box depends on type). This code is working, and I would like to know how to ...
Raskolnikov's user avatar
-1 votes
1 answer
95 views

Should you declare variables to make Model property names shorter? [closed]

Let's say the model for a razor view has the following name: Model.Receipt and there are a couple of places where you do ...
uioporqwerty's user avatar
1 vote
1 answer
978 views

Bundling JavaScript resources for an MVC app

This is my first MVC app. I'm looking for best practice feedback on how to best bundle the files that I need, the order to bundle them, the placement of the @render ...
Ivan's user avatar
  • 111
10 votes
1 answer
57k views

MVC binding list of values to checkboxlist in an efficient way

I have this code which generates and shows list of selectable items that user can post to controller in order to save into database. Model looks like this: ...
user avatar
4 votes
1 answer
134 views

Joining tables with EF

Here is my database: Here is my viewModel: ...
Oli's user avatar
  • 205

15 30 50 per page