Questions tagged [asp.net-mvc-sitemap]

99265 questions
1

votes
0

answer
263

Views

hosting MVC core Apllication without publishing

we started to work in a MVC core application. I have seen many web site about hosting Core application after publishing. can we host a MVC core web app without publishing,that is copy all files from local to server machine using ftp as we do in asp.net project.Since it is in development stage there...
rajin
1

votes
1

answer
199

Views

Package 'Faker.Net 1.0.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'

I'm new to .NET core tools and just ran into an issue while running the following command; I can see that it's just a warning but it's not creating the 'publish' folder even with 'sudo dotnet publish -o /publish' dotnet publish -o /publish As you can see there's no publish folders /home/joel/worksp...
pelican
1

votes
1

answer
258

Views

jQuery UI Autocomplete in MVC modal window

I'm trying to implement the autocomplete jQuery UI function in a Bootstrap modal window, but it does not work. screenshot module console debug Take the steps of not returning a partial view, also already implement jQuery CSS styles, the truth works for me in full views, but why when calling a modal...
Fytito Ambiado
1

votes
0

answer
482

Views

MVC Ajax, Post to Controller base64 string

In my project I send post json data object. One item of this object is base64 string. When base63 string is too long, my request doesnt reach to controller. In my opinion , due to length of parameter,it doesnt work. I couldnt find any solition. [HttpPost] [ValidateInput(false)] public ActionRe...
Çağrı Taçyıldız
1

votes
1

answer
223

Views

Where does ASP.NET Identity store information about external authentication provider?

In my ASP.NET MVC application, I have enabled authentication using Microsoft and Google accounts. They both are working fine. i.e., I am able to login to my application using my hotmail and gmail both accounts. Once logged in (say, using Microsoft account), I am able to see following screen as well...
Nirman
1

votes
1

answer
53

Views

html.beingform not generating appropriate url

I am using html.beingform to generate the url to post @using (Html.BeginForm('action', 'ctrl', new { id = 5, name = 'a' })) the url getting generated is but it should be generated as what is wrong with the syntax I am using?? EDIT I tried below syntax as per comments @using (Html.BeginForm('action',...
hr-tis
1

votes
0

answer
32

Views

Authorize attribute on a controller inside an area

I have an Area with a few controllers inside it, decorated with the [Authorize] attribute. I also have a few controllers outside the area. To default to the controller inside the area, I have updated my routes, to look like: routes.MapRoute( name: 'Default', url: '{controller}/{action}/{id}', defaul...
Sameer Anand
1

votes
0

answer
39

Views

Unsure how to list all records using MVC [duplicate]

This question already has an answer here: The model item passed into the dictionary is of type 'ViewModels.SiteModel', 1 answer The model item passed into the dictionary is of type .. but this dictionary requires a model item of type 3 answers I am still very new to MVC. I am trying to display al...
DForck42
1

votes
1

answer
29

Views

Update table from webpage

I'm using a stored procedure to update a table when the user clicks approve however I get message that it was approved successfully but the table wasn't updated. Update I'm now only able to update one item; even I select more than one item it is only updating one. Stored Procedure Update Requisitio...
1

votes
0

answer
698

Views

ASP.NET MVC Razor Sections and Partials

I'm relatively new to ASP.NET MVC and Razor. We've been modifying and developing based on existing code. Thus, there is a lot of duplication (ugh!). So I started looking at Partial pages and learning about Sections. I followed these tutorials but I'm still a bit confused. ASP.NET MVC 3: Layouts...
Patricia
1

votes
0

answer
113

Views

shared CSS and JS multiples projects Asp.net Core

I have a project which will have a framework for several projects, these projects will be done in asp.net core, several CSS files and JavaScripts will be shared between the projects, I would not like to copy and paste these files in each project, I would like to know how to share these CSS and JavaS...
Gabriel Fernando
1

votes
1

answer
169

Views

How to set the scheme for Authorize attribute from a .txt file?

My controller is protected with Authorize attribute. What I want to do is to tell the Authorize attribute to use Windows schema or no schema at all. How would I accomplish that? [Authorize(AuthenticationSchemes = AuthSchemes)] Case: AuthSchemes = 'Windows' Case: AuthSchemes = '' I want to change t...
TreeZ
1

votes
1

answer
507

Views

Combine ASP.NET MVC and Web API projects using identity

I am new to ASP.NET and I have to create an ASP.NET MVC project using the identity framework for authentication and authorization, but the access to the database (SQL Server) must be done in an independent web service project so I created a Web API project with also identity containing all services...
sam
1

votes
0

answer
100

Views

what is the Best way UrlRewriting in umbraco?

I want to change this http://localhost:65438/vehicle?id=12345 into http://localhost:65438/Make/Model/?id=12345 For this i am using following code for urlrewriting in umbracoUrlRewriting.config But the problem is that it is hitting the page load action of vehicle view continuously after a period of...
Plz Help
1

votes
0

answer
40

Views

Code freezes when trying to set new user password in Active Directory in ASP.NET MVC 5

var NewUserPC= new PrincipalContext(ContextType.Domain, Server, OU, ServiceUserName, ServiceUserPassword); var user = new UserPrincipal(NewUserPC); user.GivenName = firstName; user.Surname = lastName; user.Name = firstName + ' ' + lastName; user.UserPrincipalName = FILN + '@domain.com'; user.SamAcco...
rStackSharper
1

votes
1

answer
62

Views

How to maintain view state when navigating between screens in ASP.NET

In an ASP.NET application, I would like the screen state to be preserved when navigating between screens. So if on a screen A I search for something and the data is presented on screen, I then click 'Next' to navigate to screen B, then click 'Back' to navigate back to screen A, the search parameters...
user1340582
1

votes
0

answer
65

Views

ASP.net web application deployed to elastic beanstalk giving 500 error

I have ASP.net web application running good in localhost. Then I published that application to AWS Elastic Bean Stalk. When I opened that URL, it shows 500 Internal Server Error. Please help me.
Rajiv Krishnaa
1

votes
1

answer
27

Views

Database name list not display issue

I am getting blank list when i trying to add database with entity framework. Note: i am using code first approach. Please check the screen shot bellow for better understanding. Its existing project just deleted .edmx and now trying to generating again for a issue.
Kevin himch
1

votes
1

answer
11

Views

Regex Color tabs in Visual Studio Community 2019 don't seem to be working

Previously in Visual Studio Community 2017 I had configured a series of Regex expressions to color the tabs when working in MVC according to whether these were controllers, views, models, dbcontext, and other custom conditions to find them better visually. Now I'm testing Visual Studio 2019 and alth...
strtCoding
0

votes
0

answer
5

Views

How do I scrape an ASP.NET web page with HttpWebRequest and not get a 403 response?

this project is for dotnetcore2.2 on a linux server. using a browser driver (ie selenium) is out of the question for this exercise. here's the code https://hastebin.com/ucevazoziw.cs the purpose of this program is to POST back to the server (which is running ASP.NET4 on NGINX hosted by AWS by a 3...
1

votes
1

answer
293

Views

ASP.net MVC AntiForgeryToken

I've been adding AntiForgeryToken to my site, but I keep getting to errors which refer to my login page (POST) 'The required anti-forgery cookie '__RequestVerificationToken' is not present.' The provided anti-forgery token was meant for user '', but the current user is 'userXYZ'. My Login page is li...
D-W
1

votes
1

answer
49

Views

Cannot append data to <tbody> element by Jquery append() Method

I have an application developed on ASP.NET MVC5. Following is the code of the controller: namespace ACCOUNTS2.Controllers { public class SelectDealController : Controller { private ACCOUNTSEntities db = new ACCOUNTSEntities(); // GET: /SelectDeal/ public ActionResult Index(string option,string sear...
Uzair Raza
1

votes
0

answer
132

Views

Failed to decode downloaded font— After Bundling in Umbraco Asp.net

I did Bundling of my scripts and Styles yesterday when I upload my website on azure as a dev branch then I am facing Warnings of fonts (Failed to decode downloaded font) You may see here. In my web.config I had this static content and my one of css file is this @font-face { font-family: 'Simple-Lin...
Azaz ul haq
1

votes
0

answer
183

Views

ASP.NET core MVC parent controller

I am trying to figure out how to use MVC for a new project. The project will have the following architecture: Multiple projects will be possible to create. The database is shared meaning that there are tables: Projects, Classes, Students, Assignments. The only thing that bothers me is the routing. W...
YoloQ
1

votes
2

answer
200

Views

Ajax Call returns status 0 in mvc

I am looking to post the data from my view to controller using ajax. But when i tried with the below code, ajax call always fires error with status code 0 and not passing the data to controller. How can i modify my code to pass the data to controller. Any help appreciated thanks in advance. Submit B...
Muzz
1

votes
1

answer
373

Views

Open Rotativa print dialog automatically

I am using Rotativa to generate a PDF of a view with the intention of printing it. I have the following code public ActionResult PrintTicket(string tempTickID) { //var tick = ctx.vw_printTicket.Where(e => e.noTicket == tempTickID).FirstOrDefault(); // return View(tick); var report = new ActionAsPdf(...
unknown techh
1

votes
1

answer
32

Views

two models on one page MVC

I am trying to bind two models on one page.. using this mehotd: https://www.codeproject.com/Articles/1108855/ways-to-Bind-Multiple-Models-on-a-View-in-MVC I made a controller and it seems to work fine, except for one thind, The 'list'. It cannot implicitly convert type List to Model: public class M...
Jerome
1

votes
1

answer
387

Views

Increasing maxjsonlength on MVC post from Javascript

I have a controller action Export which accepts a List of models like below. This is sending back and manipulated dataset back from the view where the user could interact with it. So we have been able to send the data down with much more information. [HttpPost] public JsonResult Export(List sources)...
TheHamstring
1

votes
0

answer
17

Views

How to Navigate to a New Page and a Specific Section of a Bootstrap Carousel in AngularJS

I have a page that uses an AngularJS controller (Ctrl2). This page has a button on it that is supposed to navigate the user to another page with a completely separate controller (Ctrl1) and then to slide 1 of a carousel. How can this be done? Cshtml View for Ctrl2: Controller 2 Go to Controller 1, S...
crackedcornjimmy
1

votes
2

answer
57

Views

How are the default MVC Controllers added to the route table

We says that the MVC request is processed by the controller/action which are mapped in the Routetable. In routeconfig file, there is only one (default) route is mapped. But how all the controller/action excecuted correctly. How the other routes are added in the routetable ?
Anandh
1

votes
0

answer
200

Views

Required field validation with label name in MVC asp.net

Is there anyway to show label as required when validating a form? I'm asking this because I have this translated labels in my form and it would be easier if I can show those labels when user missed one instead of standard 'Required' text(which is not translated). I want to replace [Required(ErrorMes...
H35am
1

votes
0

answer
362

Views

CRUD operations in ASP.NET MVC through Entity Framework Code First Approach using stored procedures?

I'm new to ASP.NET MVC and Entity Framework. I have assignment of performing CRUD operations using EF code-first approach via stored procedures. I had tried it in a database-first approach and succeeded, but in a code-first approach, I've been stuck for the past week. I've searched on google but ev...
Awais Zafar
1

votes
0

answer
22

Views

Button type button posting data is not saving in DB

i added on message Box and i am posting that data but not adding in my DB. when i am trying to click Confirm button it is not saving in data-base how it will save to data-base can you please help me. enter image description here var leaveManagement= { leaveData: null, showModal: function(data) { lea...
Dinesh
1

votes
1

answer
113

Views

Editing only part of object in view but pass whole obj to ActionListener

I have a form with a submit button that should pass through the item to the actionlistener. I thought it might be similar to the question in @Html.HiddenFor does not work on Lists in ASP.NET MVC but none of the answers seem to work. You can even see my for-loop taken from one of the answers in there...
Corné
1

votes
0

answer
249

Views

ASP.NET - How to draw a signature on pdf?

I'm building a system using Asp.Net MVC and I have some .pdf contracts into the project where my users need to print, sign and send it to me, then, I was thinking about to create a way where user can to draw his signature with mouse as a pencil and after that save file into a folder. How could I do...
FernandoPaiva
1

votes
1

answer
397

Views

Google NLP authentication/call issue

I am working on an MVC web application that uses Google Natural Language Processing API to parse different input from users. I have successfully consumed and implemented the API operations and everything works fine as long as I run the application on my local machine. But as soon as I publish a vers...
Abdullah
1

votes
2

answer
1k

Views

Download files from the azure data lake

I upload my files in azure data lake. I try to download that file through asp.net mvc application.I have adl path for that file. I can download below 150 MB files. But i can't download the more then 150 MB files. Time out error came. My Code in the bellow... public ActionResult Download(string adlpa...
poorna chan1995
1

votes
1

answer
137

Views

jQuery Accordion Wizard within Kendo Grid custom pop-up editor template

I'm having trouble getting the jQuery code to run inside the Kendo Grid Editor popup. I'm trying to use this: http://sathomas.me/acc-wizard/ I can get the accordion to display within the popup edit window no problems. The accordion functions but there is no link between the numbered steps in the lef...
mgh75
1

votes
1

answer
118

Views

MVC 5 Html.Action.Link open as toggle

I'm new to MVC so i want to ask. I made basic database with entity framework,everything is just fine. In index page i have generated stuff @Html.DisplayNameFor(model => model.Name) etc... Than i have 3 actionlinks to modify database. @Html.ActionLink('Edit', 'Edit', new { id=item.ID }) | @Html.Acti...
L.Johnson
1

votes
1

answer
572

Views

How to show sweetAlert Validation Delete Dialog in ASP MVC

I am developing an ASP MVC 5 web application using SQL Server. I am trying to delete a profile (client in database) via a button with javascript function. Clicking on the button, the profile is deleted but the validation dialog doesn't appear. I don't know what the reason is but I doubt that there i...
Exact

View additional questions