Questions tagged [asp.net-mvc-3]

ASP.NET MVC 3 is the third major version of Model-View-Controller extension for developing web applications in a .NET framework.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
21 views

I want display identity column in textbox that is generated by database using ado.net mvc

`namespace PAMS_Project1.Models { [Table("Department")] public class Department { [Display(Name ="Sno")] public int id { get; set; } [Display(Name = "Department_Id")] ...
Divya's user avatar
  • 1
0 votes
0 answers
9 views

How to make correct test project

Good day. I create test project wdho.ru/6Rva by url completecsharptutorial.com/mvc-articles/mvc-design-master-page-layout-with-css-html-template.php But after launching the program, the page display ...
Sergey Ivanov's user avatar
0 votes
0 answers
11 views

MVC Increase max number of concurrent simultaneous request per user [duplicate]

I am working on a MVC .NET 4.7 web application. There is a use case when users start a time consuming process via an ajax call. Once this time consuming task has started, they might give up on it and ...
A.D.'s user avatar
  • 1,062
0 votes
0 answers
31 views

Error Number:2705,State:4,Class:16 Code first approach

currently I'm using MYSQL 2019 (EF 3.1)and Visual Studio 2019 ASP . Net Core 3.1 version. This is my model: public class User { public int Id { get; set; } \[Required\] public string ...
Gric's user avatar
  • 11
0 votes
0 answers
35 views

Integrating the SSO for MVC3 application with AzureADB2C account

I have a MVC3 application, which has it's own authentication( when user providers username and password, it will redirect to landing page), Now the users are migrated to AzureB2C, so they have an ...
Sunny_'s user avatar
  • 1
0 votes
0 answers
93 views

How to integrate Asp.Net MVC existing application to MAUI Framework

I have an existing Asp.Net MVC web application. I want to integrate my existing MVC web application into the MAUI framework without any new development. I want to just create wrapping up the code
Rajesh's user avatar
  • 1
0 votes
0 answers
22 views

A list of input parameters with only one Google reCaptchav3 token

I have a web page with Google reCaptchav3. It allows to input an ID number, click a button and requests from database some results. If a user input an ID number and click the button, then it generates ...
Delmonte's user avatar
  • 411
0 votes
1 answer
40 views

Multiple models in single view in ASP.NET MVC

In my web application In the main view, I want to show separate model data. For that first I created a view model like this: public class ProductsViewModel { public IEnumerable < ...
Dev Beginner 's user avatar
0 votes
1 answer
85 views

how to make event for button in gridview asp.net vb language?

I have error when i try to click button in gridview that will update selected row Code and the error in the image Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ...
Mohamoud Abdi's user avatar
0 votes
1 answer
58 views

How to add a Class file to an aspx file and invoke methods from class file into aspx while controls like GridView are in aspx file?

I am using ASP.NET Web Forms. I am trying to invoke a method from a separate cs Class file. Specifically, I have an aspx file Default.aspx and a class file Class1.cs: Here is my file: Default.aspx ...
darieem's user avatar
0 votes
0 answers
14 views

MVC Cshtml page I want to create reverse case of below code ["ResponseMessage"]!=null && ["ResponseMessage"]!=""

else if (TempData["ResponseMessage"] != null && (String)@TempData["ResponseMessage"] != "")
user7413238's user avatar
0 votes
0 answers
19 views

How to pass SQL Query client to server site through FireWall?

You can use the DISTINCT keyword with the COUNT() function in SQL Server to count the number of distinct values in a column of a table. Here's the basic syntax: SELECT COUNT(DISTINCT column_name) ...
rocky dada's user avatar
0 votes
0 answers
30 views

Can we set custom userid value to User_id column in request table in Azure logs?

I need to set the custom value to the User_id column in the request table of Azure logs. This is to collect the insights about the users who access and visits my web-application. I've a working method ...
Vikram R's user avatar
0 votes
1 answer
34 views

DropDownList tag helper while using ViewBag it is not return the selected item Id

Controller ViewBag is following: ViewBag.Products = new SelectList(await _productService.GetAllProduct(), "ProductId", "ProductName"); Razor page DropDownList tag helper is ...
DEEPRO's user avatar
  • 1
0 votes
0 answers
10 views

when i run my project i can't see the result

const newPatientsData = { numberNewPatients: '@ViewBag.NumberOfPatients' } const drawNewPatients = ({ numberNewPatients, numberPatientsSendData }) => { document.getElementById('...
wissam wissam's user avatar
0 votes
1 answer
33 views

ASP.NET MVC3- turn off caching, but only for "pages", no for static content

For a project of ours, our customer ran a "pen test" across the ASP.NET MVC 3.0 application and found a number of security issues that they want us to fix. The one that causes the most ...
user13063200's user avatar
0 votes
0 answers
44 views

HttpWebRequest post arabic data like squares

I am trying to send a HttpWebRequest data in Arabic to my e-shop using c#. The problem is that in e-shop the Arabic chars. looks like special characters like this My c# code is in bellow. If some ...
Eng Sabreen Saber's user avatar
0 votes
0 answers
16 views

How to set blank value if null or empty value coming from model in the .NET MVC [duplicate]

I am using .NET Core MVC. In the .cshtml page, I am using the data from the model but when the data is null, I am getting the error below. I want to set a blank (" ") value if a null or ...
Sufyan Taskin's user avatar
-1 votes
1 answer
33 views

The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml": "Script"

I try make Sctipt section by @section Script but @section not worded @section Script { <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="...
عالي بخي's user avatar
0 votes
0 answers
99 views

A second operation was started on this context before a previous completed how to fix that

InvalidOperationException: A second operation was started on this context before a previous operation completed. This is usually caused by different threads concurrently using the same instance of ...
masoud rahimi's user avatar
0 votes
0 answers
62 views

When i render a partial view with Jquery the bootstrap does not work

This is the code that i use to render a partial view when i select a option in the combo box <div class="row"> <div class="col-md-6"> &...
Alexandre Costa Rodrigues's user avatar
0 votes
0 answers
22 views

Choosing Spreadsheet control in ASP.NET MVC 3

I searched and tried different controls. One of them is Syncfusion https://www.syncfusion.com/aspnet-mvc-ui-controls/spreadsheet This control support from MVC 4, Unfortunately my app is MVC 3. Tried ...
Chatra's user avatar
  • 2,941
0 votes
0 answers
51 views

How to call function from one controller to another controller?

I'm using MVC3. I have a ActionLink in my home page, which will redirect to another dueItem page: @Html.ActionLink("Due Items", "Reports", "Reports", null, new { @class = ...
Acadia's user avatar
  • 1
0 votes
0 answers
37 views

after error by enable migration in asp.net mvc not core

Unable to determine the principal end of an association between the types 'ClassLibraries.Entities.Product' and 'ClassLibraries.Entities.Category'. The principal end of this association must be ...
Abrar Khalifa's user avatar
2 votes
1 answer
468 views

How to Block Http Methods in ASP.NET

We have a requirement of disabling the HTTP methods besides POST, GET and Head in an ASPNET Core Web application due as a part of security fixes. How can we disable the HTTP OPTIONS method in ASP.Net ...
Suzaku's user avatar
  • 21
0 votes
1 answer
71 views

Custom UserManager Asp.net MVC

Im trying to 'extend' the UserManager in an ASP.net MVC web app. I have read through a couple of previous posts regarding this, and I don't seem to be getting in correct. Extending the UserManager I ...
James's user avatar
  • 93
0 votes
1 answer
463 views

InvalidOperationException: The view 'UserLogin' was not found, when migrate from asp.net core 2.1 to asp.net core 3.1

I have migrated my asp.net core 2.1 to asp.net core 3.1, but I got this error in my startup code, An unhandled exception occurred while processing the request. InvalidOperationException: The view '...
Hedayat Hoshmand's user avatar
0 votes
0 answers
73 views

Facing error on deployment server, i have just FTP access but no access of source code?

After deploy application on server i am facing this error, application is developed in asp.net mvc. Configuration Error Description: An error occurred during the processing of a configuration file ...
Zahid Lateef's user avatar
1 vote
1 answer
152 views

What regular expression needed to extract a part from a text to include splitting points too?

heres is the code where I get strings from a textbox: string txtS = TextBoxS.Text; than extract some text with regex: string[] splitS=Regex.Split(txtS, @"\s(we|tomorow)\s"); text: Today we ...
user20465780's user avatar
0 votes
0 answers
75 views

span class css style doesn`t work with aps.net button

Here is css style code in ASP.NET Webform: <style type="text/css"> .button1c { background-image: linear-gradient(to right, #006175 0%, #00a950 100%); border-radius: 40px; box-...
user20465780's user avatar
0 votes
0 answers
106 views

How to split a text at the beginning of a string using Regex.Split?

I tried to split a text with words and the problem is that it splits at the end of string, here is what I tried: string StringFromTheInput = TextBox1.Text; string[] splichar1 = Regex.Split(...
user20465780's user avatar
0 votes
1 answer
471 views

The model item passed into the ViewDataDictionary is of type but this ViewDataDictionary instance requires a model item of type 'System.Collections

When I Want to post my Form in Asp.net.Mvc I get this Problem How can i fix that InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'FormValidation.Models.Entity....
Sinan's user avatar
  • 3
0 votes
1 answer
100 views

Is there a regulate expression in Regex.Slit() which splits text into sentences and avoid duplicate sentences in the same time

here is the simple code: string input = "First sentence. Second sentence. Third Sentence"; string[] sentences = Regex.Split(input, @"(?<=[.])\s+"); How can I put some ...
user20465780's user avatar
0 votes
1 answer
76 views

How to delete string [] arrays from another string?

First I define my string array and a string from which I want to remove words: string[] excludeWords = {"word1","word2","word3","word4","word5"} ...
user20465780's user avatar
0 votes
1 answer
90 views

Find a word in a TextBox1 and if it found add the line to TextBox2

First I read the TextBox1 using TextReader than tried to find a string 'flag' in TextBox1 TextReader read = new System.IO.StringReader(TextBox1.Text); int rows = 5000; string[...
user20465780's user avatar
0 votes
1 answer
69 views

Adding namespace to SOAP API response to access elements in the response using XmlNamespaceManager in C#

I am trying to access all elements int this SOAP response, but I am finding it difficult to access the elements inside the response. I am trying to use XmlNamespaceManager, but do not know how to go ...
David Mboko's user avatar
0 votes
3 answers
133 views

How to get the second most frequent word from the text?

Here is my code: string StringFromTheInput = TextBox1.Text; string source = StringFromTheInput.ToString(); var frequencies = new Dictionary<string, int>(); frequencies.Add("item", 0);...
user20465780's user avatar
0 votes
1 answer
602 views

Cannot signin using HttpContext.SignInAsync

I'm developing an application using ASP.Net Core MVC 3.1 and i am facing a problem where it fails to sign-in. localhost response 401 unauthorized AccountController [HttpPost] public async Task&...
Remzi Tural's user avatar
0 votes
1 answer
186 views

ASP.Net Core MVC : How to use css after press button in the section of HTML.BeginForm

My code are below @using (Html.BeginForm("PostUsingParameters", "loopW")) { <input type="text" name="num" /><br /> <input type="...
atikom jaengdee's user avatar
0 votes
1 answer
492 views

how to add where condition in include table in linq

I can use the dynamic model I want to add where condition in the "Tbl_ProductImg" table in this table I want only those record which has "isActive" value 1. model.Product = db....
Mahendra Lohar's user avatar
0 votes
1 answer
66 views

How to get value of a prepopulated username input field in java script or jQuery

I need to get the value of the username field when the browser prepopulates it. The javascript is on a cshtml page. I have tried getting it in the document.render function, but the value is empty. I ...
BlueBird's user avatar
0 votes
0 answers
34 views

When Add Migration Get Unable to create an object of type 'SystemDbContext'. ASP CORE 5.0

I create tables in the Domain layer when I adding Migration from the package manager console I get errors Unable to create an object of type 'SystemDbContext'. For the different patterns supported at ...
Fadl's user avatar
  • 3
-1 votes
3 answers
1k views

Using Json.stringify in controller in asp .net MVC

I have written this part of ajax code to post some information that will be updated in the database. function postUpdateList() { var id = $('#Id').val(); $.ajax({ url: `Home/EditPost/${...
Tariqul Islam Khan's user avatar
1 vote
1 answer
600 views

How to customize button in Telerik form / kendo-form?

I'm new in the Telerik UI. When I want to customize a kendo form in asp.net razor pages. But I to rename button name. But I couldn't find any button field. I follow this link [Telerik Form][1]. I edit ...
Mizanur Rahaman's user avatar
2 votes
0 answers
477 views

Display UTC datetime that is converted to web user's local time

I have a MVC project, and the MVC controller pass a view model that has a UTC datetime property. I want on the MVC View page, the Utc datetime converted to web user's local date time depending on his ...
Thomas.Benz's user avatar
  • 8,411
0 votes
1 answer
254 views

Model Binding with DisplayFormat on Decimal does not work

asp.net-core-mvc I have a ViewModel with one decimal property on it: public class RdoViewModel { [DisplayFormat(DataFormatString = "{0:C0}", ApplyFormatInEditMode = true)] public ...
Terrence's user avatar
  • 2,734
0 votes
1 answer
819 views

Set redirect as permanent status (301) with MapControllerRoute .Net Core

I'm having trouble trying to set my redirect as 301 (permanent redirect). Currently, it's showing as 307 (temp status). Code below: routes.MapControllerRoute("Redirect", "...
Victoria Le's user avatar
1 vote
0 answers
419 views

How to implement Single Sign On in ASP.NET MVC application

We have developed 2 applications in ASP.NET MVC. We have used ASP.NET Identity in both applications for user authentication. Both applications use the same database. Also both apps are hosted on Azure ...
Kiran_92's user avatar
0 votes
1 answer
622 views

How can i get the name of property and value from object and pass this name and value to a list in c#

I want to get the property name and the value from object and pass them to the list. i dont want to pass one by one property and value to the list like commented in my code. want to use loop and add ...
M. Rizwan's user avatar
1 vote
2 answers
2k views

Dependency injection for open type generic interface and closed type class

I have a generic interface IViewModelService.cs public interface IViewModelService<T> where T : class { public Task<T> Get(); // returns a view model } Which is implemented by two ...
enricosebastian's user avatar

1
2 3 4 5
770