Questions tagged [asp.net-mvc-4]
ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.
42,419
questions
0
votes
0
answers
11
views
The model item passed into the dictionary is of type 'VillaSite.Models.ReservationForm', but this dictionary requires a model item of type 'System
When I make a reservation request from the web page, it gives the following error. I wrote the web page codes on my computer. I debug. there is no problem and the site works perfectly on the local ISP....
0
votes
0
answers
11
views
Is there any WhatsApp Message API for ASP.NET MVC 4.5 ? I need to send messages in bulk(list of numbers)
Is there any WhatsApp Message API for ASP.NET MVC on .NET 4.5 ? I need to send messages in bulk (list of numbers). Please help, I need to integrate it into my ASP.NET MVC application.
I'm currently ...
0
votes
0
answers
12
views
How to install AJAX in Visual Studio 2013
I am using the HandsonTables and I can get it to display the Grid with the correct number of Columns and even got it to display the correct Headers. Problem is my buttons do not seem to work. My View ...
-1
votes
0
answers
20
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")]
...
0
votes
0
answers
18
views
Orchard Core - InvalidOperationException: The view 'Index' not found
I'm working on an Orchard Core 1.6.0 solution where I've added two modules: a theme and a "History" module.
The theme, as best I can tell, works fine. It even fetches the Layout.liquid ...
0
votes
0
answers
16
views
ASP.NET MVC 4 does not render correct date format for input field of type date
The date shown is MM/dd/yyyy, my regional settings are dd/MM/yyyy, and that's what I want it to be. I tried to set the culture in global.asax and in the action it self and in Application_Start().
Also ...
-1
votes
1
answer
58
views
void Or Task<bool> Which one should I use? [closed]
Which one is better in terms of performance for the update and addition operations?
public void Add(Test model)
{
_context.Table.Add(model);
}
OR
public async Task<bool> Add(Test model)
{
try ...
0
votes
1
answer
23
views
Dynatrace More lock time in .Net application
I have an application in production. Angular UI---->UI Controller(.Net)----->Web API Controller(.Net)----->Database with dynatrace oneagent running in all servers.
I see spikes of specific ...
-1
votes
1
answer
55
views
after click on submit button URL change How to keep it as it is without changes?
I work on an ASP.NET MVC razor page. I face issue Url change from
Resignation/RequesterIndex?filenumber=103085
to
Resignation/Create
after click submit button.
I need URL as it was before, without ...
0
votes
0
answers
9
views
Readonly text box showing validation for Regex in MVC
I am having textbox which is readonly but still showing Regex validation.How to remove Regex validation for readonly textbox.
Here is my Model
public FormModel()
{
public string Area { get; set; }
...
0
votes
0
answers
11
views
Why my .NET MVC application session never expire?
NET Framework 4.8
MVC 5.2.3.0
.NET Identity 2.0
I set this in Web.Config:
<sessionState timeout="1"></sessionState>
this supposedly will log user out after 1 minute inactivity. ...
0
votes
0
answers
12
views
"Unable to connect to the configured development server"
I am trying to run an old .NET MVC project in visual studio 2015 but it shows the error "Unable to connect to the configured development server". But if I create a new project it works. It ...
0
votes
0
answers
31
views
Sytem.Net.Http.HttpClient works differently in .net core and .net framework
I build two Api's working exectly same one in .net and other one in .net core.
I have another .net core project where i use these api's one by one.Interestingly .net project work properly but in .net ...
0
votes
0
answers
23
views
Invalid nested tag head found, expected closing tag link. asp.NET
In my asp.net MVC project, I created a view as a report.
So then from the controller other than passing the view, I wanted to generate a pdf from the view and send the front end as a PDF file.
For ...
-1
votes
1
answer
21
views
MVC - How to render a 'a href' link in a CSHTML on a HTML and PDF that's been stored in a database
I have an MVC app with CSHTML view
There are 2 question, that have text as "This is the website Google to search."
The text is stored in DB and displayed on the cshtml page which will be ...
0
votes
0
answers
18
views
How to export a word document in landscape format with jquery word export?
Im trying to export a word document in landscapte format due to i have a table with 10 columns and they don fit well, so i want to change the orientation of the page of the word document.
i tried with ...
0
votes
0
answers
73
views
Understanding async/await - why ConfigureAwait(false) and GetAwaiter().GetResult() caused deadlock but wrapped inside Task doesn't cause deadlock
I need to understand more about why async/await causes deadlock. As far as I know, using ConfigureAwait(false) will marshall back the operation to the original SynchronizationContext. I tried the ...
0
votes
0
answers
15
views
CkEditor textarea return always null in controller POST method? ASP.NET MVC
I have configured CKEditor in my asp.net mvc project. Its showing fine but it return always null value in controller HttpPost method.
Controller:
[ValidateInput(false)]
[Authorize]
[HttpPost]
...
0
votes
0
answers
11
views
How to use WebMarkupMin.MsAjax
I'm trying to minify using WebMarkupMin.MsAjax in a standard ASP.NET MVC4 project, but I don't understand how
I dug around on different sites and could not find the answer, and the documentation ...
0
votes
0
answers
14
views
How to create data grid with user inputs using drop down method in Visual studio code 2022 community version using ASP.NET core web app(MVC)
I was working on web application where we need to create drop down menu which redirects to data grids/Tables in the dropdown menu. In the data grid user should be able to input their data in the grid ...
0
votes
0
answers
15
views
ASP.NET MVC login stopped working with a #_=_ callback
I am running a ASP.NET site that has Google and Facebook login using ASP.NET Identity OAuth login. I am on version 4.2.2 of the Microsoft.Owin.Security.Facebook plugin. I am now experiencing that ...
0
votes
0
answers
31
views
I want to display decimal value in en-us currency format in ASP.NET MVC TextboxFor
@Html.TextBoxFor(m => m.Value, "{0:N2}",
new { @data_val_number = "The field value must be a Number." })
value = 1182519.13 in edit mode, I want to display 1,...
0
votes
0
answers
18
views
Entity Framework 6, Fluent API - many-to-many relationship
I am using EF 6.4.4 in an ASP.NET MVC 4 application and am trying to model some SQL using Fluent API a many-to-many relationship with a join table. The SQL I am trying to duplicate is as follows:
...
0
votes
1
answer
35
views
ASP.NET MVC 4 Validation Summary/Text Without Html Helpers
I'm trying to get the validation text to appear either in a span below my input or in a summary div. I'm not using the HTML tags just plain inputs.
My HTML output is below:
<input type="text&...
0
votes
0
answers
13
views
Passing a list from a table in a view in asp.net mvc 4 to the controller
I have a model with a parameter that's a list of another model. I want to show that list as a table, have a check box to select some elements, and then I want to press a button and send the list of ...
0
votes
0
answers
16
views
Passing form values from view to controller
I am newbie to ASP.NET MVC and I have view which consist of some form values and there are 2 buttons save and cancel. On button save click, I want to send the form values to controller method.
When I ...
0
votes
0
answers
39
views
Calculating the Line Total Amount in the table JavaScript
I'm creating an invoice view for my asp.net MVC project.
Currently, the selected item is added to the table and there it shows the Item Name, Qty, and Amount.
I want to add the Line amount also. The ...
0
votes
0
answers
29
views
Users see all file in wwwroot folder
I have problem about wwwroot in MVC4.
When I enter folder that is in wwwroot folder, all files are visible.
I don't want Users to see all the files in folder, But files are accessible in single ...
0
votes
0
answers
11
views
jQuery MaskedInput placeholder text repeating
Trying to use MaskedInput plugin to format a date input form field but the placeholder text is repeated.
Using MVC 4,jQuery 3.6.3 and jQuery.maskedinput 1.3.1
I want the placeholder text to be "...
1
vote
0
answers
83
views
Send a Document to Local Print in ASP.NET MVC Project
Im creating a web-based POS system using asp.net MVC architecture.
There in the Invoice section after the invoice is complete I send the data to crystal report and the report send to the POS printer.
...
-1
votes
1
answer
83
views
Getting System.IO.FileNotFoundException in IIS but working in visual studio
I am building an application where i need to convert word file into .dat file. I have a UploadController.cs where i am uploading the word document to convert. This is working file in Visual studio but ...
0
votes
2
answers
37
views
How can I Sort this MVC Drop-Down list alphabetically but IGNORE brackets?
I have a dynamic dropdown list that I need to sort alphabetically, but the issue is, there is some text within brackets that appears on top.
I was asked to sort the text in brackets alphabetically (in ...
0
votes
1
answer
23
views
Need to show Show More / Show Less option in JQGrid in ASP.NET MVC
I have requirement where I need to how Show More / Show Less option in a column appended to the values I am getting from DB eg: ABC, ABD, ABE,...Show More and vice versa when the full values are ...
0
votes
0
answers
35
views
Calling model with related data in another table
In my ASP.NET MVC web application I have created a model class called TempInvoice and another called TempInvoiceItems.
This TempInvoiceItems holds the foreign key of TempInvoice ID.
I want to know, ...
0
votes
1
answer
75
views
ARIA-Description not being read by JAWS
Maintaining an MVC 4 Razor legacy application and attempting to bind some text to a date input form. I want the date format to be described by a screen reader for accessibility purposes. Other advice ...
0
votes
1
answer
53
views
how can I fix my outgoing email settings (smtp) in my website?
I recently created a website and for some reason the submit form is not working in my webserver hostgator. It works in my localhost but it does not work in the webserver. I tried using the webserver ...
0
votes
1
answer
22
views
How do I .Incluce() only the last element of an ICollection in asp.net core?
I have a db model like this
public partial class ChatThread : BaseEntity
{
[ForeignKey("ChatThreadID")]
public ICollection<ChatMessage> ChatMessages { get; set; ...
0
votes
0
answers
19
views
Missing reference to System.Runtime in web page at runtime
Short description - when I update and run a Dot.Net (4.52) MVC app on a server, I get the following error:
20230605,13:08:59,968 ERROR System.Web.HttpCompileException (0x80004005): d:\Applications\xxx\...
0
votes
0
answers
21
views
SSRS rdl Report Problem while rendering in MVC C#
Any one who have solution, I had stack into the problem regarding the width of rdl report rendering using @Html.ReportViewer
in MVC C#. The width of RDL report is not fit to the parent div as red ...
0
votes
0
answers
47
views
Why are ALL TypeScript files in my ASP.NET MVC 4 project being compiled in Visual Studio 2022 Enterprise when I save a single one?
I have a ASP.NET MVC 4 project that I edit and build with Visual Studio 2022 Enterprise (v17.5.5, ARM build) on a Windows 11 on ARM PC. This project uses the following line in its packages.config file ...
0
votes
1
answer
39
views
why does my smtp does not work when I am hosting my website in hostgator?
I have a submit form in my website. When I run my code in my localhost it works. In there I am using smtp.gmail.com with port 587. When I upload my website on line it does not submit my form it gives ...
0
votes
0
answers
36
views
why does my form not work when is being hosted on a server but it works when I run it in Visual Studio 2022?
I recently created a website that has a contact us page. When I run the code in Visual Studio, it works. After the user enters the valid input and submits the form in Visual Studio 2022, it works.
...
0
votes
1
answer
127
views
Language code "es-XL" Spanish used in Latin America not Working in ASP.NET MVC using C#
We have support for multiple languages in our application using resource files with the below language code.
English - en-Us, German - de-DE, Spanish (Latin America) - ex-XL, French - fr-fR
While ...
0
votes
1
answer
41
views
Getting Dynamically added table row selected Id from the Javascript
In my application, Here adding new rows with the dynamic ID assigned from the loop.
In the view, I'm creating a Purchase Order, and here I adding the rows to the table.
So Here When the Select value ...
0
votes
1
answer
69
views
How to load html.DropdownList to the table <td> from Javascript
In my asp.net MVC application, Im trying to create a purchase order view with item adding button.
So for the first <-td> tag I want to show the dropdown list and other columns with input text ...
0
votes
0
answers
10
views
How to wrap data in select - option in mvc
I want to implement a wrap in my select - option so that the user can read the whole word...
0
votes
1
answer
30
views
How to load table row data from Partial view
In my asp.net MVC web application, I'm trying to create a Purchase Order view.
So in this section, I added the table headers that I want to show as the main headers of the form.
<table class="...
0
votes
1
answer
52
views
JQuery Function to sort list alphabetically in <div> is not working, tried various variations
I have been trying to sort this list within a div alphabetically, but either the list disappears, or nothing changes. Any tips please? Been struggling with this for days. Any tips would be much ...
0
votes
1
answer
53
views
Getting the Text Value in Javascript
In my current process, In the view, when the user clicks on the checkbox, it took the @Item.Extra_Item_Price and Add to the Total Price.
<div class="product__price m-t-5">
<input ...
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 < ...