Microsoft Q&A

ASP.NET MVC

734 questions

A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.

Browse all .NET tags

258 questions with ASP.NET MVC tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Error while publishing code in View which has its controller return value JsonResult

Hi, I have added the following code in controller in which I am returning JsonResult and I am having this code in existing view that is : [HttpPost] public JsonResult GetVersionNumber(string testTypeName) { return Json(allowedVersion); } In View,…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2022-02-01T12:25:44.027+00:00
Santosh Umarani 81 Reputation points
answered 2022-02-02T04:50:36.073+00:00
Santosh Umarani 81 Reputation points
2 answers One of the answers was accepted by the question author.

design issues for my project for entity model and view

I am trying to describe the requirements of my project. Hope you will be able to understood it. In my project there are three primary data models, User table, address table and relationship table. One user will have only one address so it is…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
228 questions
asked 2022-01-23T08:15:51.237+00:00
arsar 121 Reputation points
accepted 2022-01-25T16:08:27.873+00:00
arsar 121 Reputation points
1 answer One of the answers was accepted by the question author.

why my vs mvc project doesnt accept bootstrap 4 or higher?

So I was following a tutorial on MVC, the tutor changed the default bootstrap theme into a bootstrap 4 lumen theme from bootswatch. I did the same but the theme, button, and navbars didnt show as it was in the tutorial. If I put a boostrap 3 theme, it…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-08-26T16:02:46.683+00:00
Kokombads Bleh Bleh 26 Reputation points
commented 2022-01-17T22:54:49.49+00:00
Josip Lovrečić 1 Reputation point
1 answer One of the answers was accepted by the question author.

ASP.NET Persisting or Adding custom claim to access_token for Protected API

I am using OIDC/OAuth with Azure Active Directory as the IDP to allow users to login to an ASP.NET 4.6.2 MVC App with their organizational account that calls a Protected Web API. This involves authorization code flow. My code is based off the sample app…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,576 questions
asked 2022-01-13T22:42:42.837+00:00
Nitish Chauhan 66 Reputation points
accepted 2022-01-14T18:12:33.317+00:00
Nitish Chauhan 66 Reputation points
1 answer One of the answers was accepted by the question author.

MVC C# get current System Unique ID or Serial Number

How to get Windows and MacBook unique serial number or device id when access web page or web site in browser because we are giving access specific Windows or MacBook devices . Thanks

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,833 questions
asked 2022-01-14T07:50:18.157+00:00
Anonymous
accepted 2022-01-14T12:19:25.683+00:00
Anonymous
1 answer One of the answers was accepted by the question author.

MVC C# get device unique Id or IMEI Number

Hi how to get Mobile device Unique Device id or IMEI for iPhone/Android/Windows/iPad or any device in asp.net C# MVC. as per requirement if i browse any web application through mobile device then will save Unique ID or IMEI in database for access…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,833 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2022-01-14T05:27:00.523+00:00
Anonymous
accepted 2022-01-14T07:46:15.747+00:00
Anonymous
1 answer One of the answers was accepted by the question author.

Will an ASP.NET MVC app using .NET v4.6.2 work with app pool .NET CLR Version v4.0.30319?

I'm about to publish a new ASP.NET MVC app which I wrote using .NET Framework 4.6.2, to a Windows Server with IIS 10 on it. I've checked the .NET Framework installed on that server; I know that .NET Framework 4.6.2 is there. My question is about the…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2022-01-12T15:47:46.237+00:00
Rod At Work 821 Reputation points
accepted 2022-01-12T18:23:19.66+00:00
Rod At Work 821 Reputation points
2 answers One of the answers was accepted by the question author.

How to show assigned Departments of an user in my lambda expression (ASP.NET MVC 5)

Hello everyone! I'm trying to show in my view the assigned departments of logged users. I'm using Forms Authentication and i have the following tables: I'm using the UserDepartmentMapping table to assign Users to a Department to show them in the…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,564 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,109 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-12-16T12:29:29.167+00:00
Diego Romero 21 Reputation points
commented 2021-12-20T11:19:20.19+00:00
Diego Romero 21 Reputation points
2 answers One of the answers was accepted by the question author.

Dialog Modal is not working in asp.net mvc

I've been trying to create a dialog editing data grid bind in sql using syncfusion in asp.net mvc however I have a problem in displaying the form in dialog modal not working. What did I missed?

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-12-03T15:00:32.893+00:00
ika palad 86 Reputation points
accepted 2021-12-17T21:35:24.303+00:00
ika palad 86 Reputation points
1 answer One of the answers was accepted by the question author.

Multiple text box search link query

public ServerContext db = new ServerContext(); public ActionResult Index(FormCollection formCollection, string HostName, string OS) { string frmHostName = HostName; string frmOS = OS; ServerContext serverContext = new ServerContext(); …

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-12-13T13:42:29.027+00:00
asif ahamed 176 Reputation points
accepted 2021-12-13T16:36:07.21+00:00
asif ahamed 176 Reputation points
2 answers One of the answers was accepted by the question author.

Try-catch best practices

In a N-layer application, what's the right place to have the try-catch block ? The question is because I've heard that having the try-block from the DAL layer up to UI, could be costly. Or should I have try-catch in all methods for all layers ? …

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-12-06T16:10:39.397+00:00
ANB 181 Reputation points
accepted 2021-12-08T22:06:46.763+00:00
ANB 181 Reputation points
1 answer One of the answers was accepted by the question author.

exporting HTML saved in sql server to word in asp.net MVC application

I have a web application developed using ASP.NET MVC, C#, entity framework and SQL Server. I am using a rich editor to save HTML in SQL Server. I am able to render the saved html to webpage correctly using HTML.Raw <p> @azzedinehtmlsql …

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,564 questions
asked 2021-12-01T02:51:41.707+00:00
Customer Support 21 Reputation points
accepted 2021-12-06T17:24:17.647+00:00
Customer Support 21 Reputation points
1 answer One of the answers was accepted by the question author.

Mask ID - Best option

www.mysite.com?productId=123 What would be the best practice to mask ID on the URL and avoid business leaks and security? Hash the productId Use Guid Have a guid column on the same product table (productId (int), productIdGuid (guid) A…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-12-06T04:55:43.527+00:00
ANB 181 Reputation points
commented 2021-12-06T16:05:03.823+00:00
ANB 181 Reputation points
2 answers One of the answers was accepted by the question author.

Trying to find a way to parameterize a report name to change in a compiled app

Greetings, I have an app that renders SSRS reports for the internet users, secured by Azure authentication tokens. The asp.net page has the report names hardcoded in its .cs file, not accessible after compiling the app. I have been searching for ways…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-11-29T19:48:30.517+00:00
polaro 96 Reputation points
accepted 2021-12-01T14:31:58.407+00:00
polaro 96 Reputation points
1 answer One of the answers was accepted by the question author.

Structure Problems - Keep variable values when scroll

Hi I have the following code to load data (30 to 30) as you scroll the page: public ActionResult Index(int? pageNum, string searchString, bool checkControle = false) { pageNum = pageNum ?? 0; ViewBag.IsEndOfRecords =…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-11-22T10:07:21.267+00:00
MiguelBT 96 Reputation points
accepted 2021-11-29T17:43:31.507+00:00
MiguelBT 96 Reputation points
4 answers One of the answers was accepted by the question author.

Display binary byte[] array instead of base64

Am trying to display byte[] array images in asp mvc c#. But there is only base64 conversion option available. I have learnt ASP MVC 5 since 2019, now am experienced and don't want to waste CPU resources on image conversation. I am displaying an image…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-09-30T15:48:04.347+00:00
kelvin nyota 21 Reputation points
accepted 2021-11-25T05:54:52.467+00:00
kelvin nyota 21 Reputation points
6 answers One of the answers was accepted by the question author.

Having trouble posting questions

I keep getting errors when trying to post questions here.

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-11-19T23:05:12.78+00:00
App Dev 86 Reputation points
commented 2021-11-22T19:40:08.283+00:00
App Dev 86 Reputation points
4 answers One of the answers was accepted by the question author.

Issue with Multiple languages resource files

I am developing a site that will have to also be available in Spanish. I found this page how-to-create-multiple-languages-in-asp-net-mvc-4-5-framework I tried to follow it as mush as possible only modifying to fit my needs. To that end, I created two…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-11-08T19:50:08.447+00:00
M J 641 Reputation points
accepted 2021-11-21T01:11:03.81+00:00
M J 641 Reputation points
3 answers One of the answers was accepted by the question author.

Add searchable Function in Dropdownlist with Razer

I want to add searchable function in dropdownlist below <tr> <td> Class </td> <td> @Html.DropDownListFor(m => m.SecID,…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,833 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-11-11T14:27:40.087+00:00
akhter hussain 2,901 Reputation points
accepted 2021-11-13T07:12:45.17+00:00
akhter hussain 2,901 Reputation points
1 answer One of the answers was accepted by the question author.

mapping web forms sql table design with foreign keys to mvc model classes

I have 3 tables: CREATE TABLE [dbo].tbl_emp ( emp_id INT PRIMARY KEY IDENTITY (1, 1), emp_NAME nvarchar(max), emp_CONTACT nvarchar(10) ); CREATE TABLE [dbo].tbl_allowance ( allowance_id INT PRIMARY KEY IDENTITY (1, 1), allowance_NAME…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
734 questions
asked 2021-07-28T11:01:24.867+00:00
arsar 121 Reputation points
accepted 2021-11-11T08:20:15.093+00:00
arsar 121 Reputation points