Content
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,…


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…
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 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…


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


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…


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…


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…


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?
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(); …


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 ? …
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 …


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…
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…
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 =…
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…


Having trouble posting questions
I keep getting errors when trying to post questions here.
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…
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,…


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…