Most voted "asp.net" questions
ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic websites and web applications. Use the tag for traditional web forms, the classic template that provides the illusion of "stateful" pages. Do not use this tag for the style using the standard Model-View-Controller; use [Asp.net-mvc].
Learn more…1,881 questions
Sort by count of
-
0
votes1
answer62
viewsError in function to return Querystring in Javascript
When using this function by calling the filter parameter of an error, instead of returning the value of the Querystring parameter it returns a Function. //Retorna os valores da querystring function…
-
0
votes1
answer200
viewsNewtonsoft.Json.Jsonconvert.Serializeobject excluding @
I am running Schema for my page and need to convert the information to print it in JSON. However Newtonsoft.Json.JsonConvert.SerializeObject(schema); removes "@" from "@context" and "@type". Like…
-
0
votes0
answers86
viewsHow to get back Task<int> of a function (Mediatr) - Asp.net Core MVC
How do I get the entire value returned through a Task? I have tried several ways, as I have seen in forums on the net, but I could not. I tried to use var customerId =…
-
0
votes1
answer44
viewsASP.NET C# Age passed by the url
Next, I have a page that receives age parameters that may vary in quantity. Example: url/page.aspx?idade=x&idade=y&idade=z My idea is to take all the ages passed by url and select only the…
-
0
votes1
answer32
viewsConceptual problem with webservice, how to make a webMethod
Good afternoon guys, I’m having a little problem here at the time of creating a webMethod. The thing is, I need to work with three levels, in the three cases I need to send to the database, follow…
-
0
votes2
answers53
viewsDoubt to Bring a Details of Two Tables MVC5 Entityframework 6.2
I’m studying ASP.NET MVC5 for college, and I came across a problem, I have three tables: Usuario, PessoaFisica, Endereco. My problem is this, when I’m right in the system, I can only bring the…
-
0
votes1
answer221
viewsHow to call a c# function when an SQL Server table changes
I have the following code on C# Asp.NET 4.5 to count the number of records in my table [HttpGet] [Route("consult")] public HttpResponseMessage GetAll() { try { MatrizGeneral matriz = null; //int…
-
0
votes1
answer26
viewsExport to excel
Good morning. I created a gridview with data from a table When I run the function to generate the Excel spreadsheet, nothing happens, could anyone give a help in what might be happening? follows…
-
0
votes0
answers98
viewsIntegrating C# projects with VB
I need to create a C# project that uses a DLL that was written in VB.NET. I added the dependency, imported the library and used the method. However, at the time of execution when I will consume a…
-
0
votes0
answers131
viewsRoutine execution in the background via Hangfire (ASP.NET Webforms)
I am in need of doing a background run on my system. For this I found the Hangfire tool. I made the settings according to the documentation and am getting the error: Value cannot be null. Parameter…
-
0
votes1
answer124
viewsQuery to bring 1 parent record and in it can contain multiple children records (performance)
Supposing for the client I can add more joins as not only sales, and the result of this consultation bring much more records. This is a performative way of working or would be better to query each…
-
0
votes1
answer33
viewsUnique selection of Radiobutton
Hello, I would like to ask for help on the unique selection of a Radiobutton, I inserted two on my page and I wish only 1 could be selected if the other was automatically unchecked the other...…
-
0
votes1
answer58
viewsHow to show a message on the screen if there are no records to be brought from the database?
I want to show a message on the screen instead of showing an empty table. How do I implement this logic in index.cshtml? @page @model xxx.xxx.Pages.Servicos.IndexModel @{ ViewData["Title"] =…
-
0
votes1
answer91
viewsAssign a C# Class to a List<> C#, via Javascript code
Hello, I want to assign new filler lines by pressing a button without leaving the page. However, I need to assign a new class. I noticed that the C# function I put inside the JS function occurs only…
-
0
votes0
answers43
viewsHow to redirect to another API when the data sent is wrong?
What happens is this, I’m making a part of the system that will do the integration of customer data. The planned idea was the following, the client will access the API to make the persistence of the…
-
0
votes1
answer43
viewsalign Html.Textboxfor right css
I can’t align a @Html.Textboxfor of the request I’ve tried in several ways. <!--NF--> <div class="col-md-2"> <p><strong> NF</strong></p> <p>…
-
0
votes1
answer150
viewsGet line data after button click on an ASP.NET Repeater
Good evening, my question is this... I want to make a "select" of the data of a line of the Repeater control according to the clicked Linkbutton (the white pencil of blue background), thus storing…
-
0
votes1
answer183
viewsInsert using methods and classes in the C#database
Hello, good afternoon, sir! My problem is the following: I am wanting to run an Insert event, which in the database will add the (name, user, sector, position, shift and extension), but now I am…
-
0
votes1
answer423
viewsHow to run an event in Codebehind being called by jQuery?
I have this code in Aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebSite.View.Index" %> <!DOCTYPE html> <html…
-
0
votes0
answers124
viewsHow to set up Hangfire authentication in Production
I’m using Hangfire to manage background tasks, it works normally when I’m on localhost, but in the production environment I’m not being able to set up the authentication needed to open Dashboard I…
asp.net-mvc asp.net entity-framework asp-net-core hangfireasked 4 years, 9 months ago iago soares 92 -
0
votes2
answers69
viewsSum of values in View
I would like to realize a simple sum of some values in my View. I tried to accomplish it that way: @foreach (ReceitaIndexVM receita in Model) { decimal Total = 0; <div class="col-lg-2…
-
0
votes1
answer102
viewsProblems in Object Reference not defined for an object instance
I have a problem with the result of the method SaveChanges(). I am trying to save a record, and it is persisted in the database, however the application is returning the message from exception:…
-
0
votes1
answer133
viewsHow to declare an image in the ASP.NET Core Model Class?
I’m following this tutorial from Microsoft:…
asp.net asp.net-mvc-5 asp.net-core entity-framework-6 entity-framework-coreasked 4 years, 8 months ago Iori Yagami 13 -
0
votes1
answer32
viewsSplit by modifying the sorting of the text file
I am loading a text file in a string [], later making a split because the file is separated by spaces, but I noticed that lines are with different sizes, this is hindering the capture of positions…
-
0
votes1
answer78
viewsSQL gets Double with "Comma" tab instead of "Dot"
I am developing an ASP.NET application where I need to take a DOBULE typed by the user and pass to the bank. However there is a divergence of information, the DOUBLE of my bank receives separator…
-
0
votes1
answer58
viewsAPI Rest only returns the last value
I am using ASP.Net to create a REST API I’m trying to create a method that returns a list of groups structured this way: { "IdGroup": "1", "NameGroup": "Group1", "Installations": [ {…
-
0
votes0
answers34
viewsHow to place the path of an image with restricted length in the database
Ola, I have a string type variable that should save the images, but it has length 40 and when trying to put the error path. I have a folder in wwwroot where I store the images and want to store in…
-
0
votes0
answers20
viewsHow to make a web scraping on an aspx site using python
I’m trying to scrap a page that uses aspx. The point is that when I go to inspect element the data I need is there, but when I give the requests on the page comes everything from html, except the…
-
0
votes1
answer38
viewsHow to Put Elses If in Layout
Ola, I am trying to put in ifs layout in order to change login to logout but it is not working. In Layout I have this code : @using Microsoft.AspNetCore.Http; @using WebApplication1.Controllers;…
-
0
votes1
answer101
viewsUpload files to Asp.NET MVC 4 - Web API - Http Put Method
So, I have to do a method in my controller for an API that accepts 2 files via PUT (1 json E1 xml for data processing, not to save the files), and I have to send the request via Fiddler.. My request…
c# asp.net-mvc asp.net asp.net-web-api multiple-file-uploadasked 4 years, 7 months ago helloCodingMyOldfriend 1 -
0
votes2
answers138
viewsI’m not being able to capture the various items selected in Lect2, how to do it?
I’m not being able to capture the various items selected in Lect2, how to do it? My goal will be to capture these items and send them to a Textbox, which I am using ? A list, see below:…
-
0
votes1
answer101
viewsHow to set the change state of a checkbox switchery using Javascript and Asp.Net Core MVC
I have several checkbox switchery components that are automatically created in which I control the ID manually, in theory, a list of elements. I need to do the following: When unchecking one of the…
-
0
votes0
answers40
viewsNhibernate error in group by
I’m studying NHibernate and is giving me an error in group by, but at first it is generating me wrong sql, do not know why, follow the code below SQL and its structure. string hql = "select…
-
0
votes0
answers126
viewsError debugging with Docker in Visual Studio 2019 with Windows 10 Home: Current user is not in "Docker Users" group
Hello, I created an Asp.net Core MVC project on VS2019. Automatically, the first debug option is "Docker", but when I try to run, the following error is displayed: CTC1010 O usuário atual não está…
-
0
votes1
answer121
viewsC# - Problems with Scriptmanager after Response
Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=Comprovante.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache);. -- código de…
-
0
votes0
answers78
views<input type="file" receiving only null value
I’m having difficulty my project, I have a field in my form where I pass a file to it and send to my controller, problem is that the value always arrives null, I tried several ways but, I’m not…
-
0
votes1
answer48
viewsSend Email Asp.net Mvc
good afternoon guys, I need a help, I don’t know if I’m doing wrong more when I try to send an email, through code in the controller nothing happens, can you give me a help of what might be waking…
-
0
votes1
answer1132
viewsAPI Rest ASP.Net Core 3.1 returning 404 error when published
I’m doing some testing with Apis in ASP.Net Core 3.1. In this case, I am using Entity Framework to access the database and Identity Core to register and log in users. To do so, I have implemented…
-
0
votes1
answer11
viewsHow to consume Razor data in a javascript file
I’m new around here, I’m trying to consume Razor data inside a js file. From what I understand the two languages do not communicate so I would need an alternative that does intermediation, taking…
-
0
votes1
answer43
viewsAsp.Net - Read Files
Hello, I need your help again. I’m working on a project that consists of reading XML files and storing the data in a table. I can already do that, but I have a problem. This is an example of an XML…
-
0
votes1
answer33
viewsHow to create a Controller for the Applicationuser
Good Afternoon, I’m trying to create an administrator area to manage the database accounts, but I’m having difficulties, I have the Applicationuser class and the Loginviewmodel class: public class…
-
0
votes1
answer19
viewsCompare the number of rows of a list in a Viewbag
I need to know how many lines(in view) I send from my controller in a type list<> for a viewbag in the view. With this enable or not the option to create new images. Controller:…
-
0
votes1
answer43
viewsHow to use a mask in a dynamic textbox?
I need to implement a mask (value) in n Textbox fields (defined by n periods x n contracts) within a grid, where they are generated dynamically. I use jQuery for static textboxes (Autonumeric). But…
-
0
votes1
answer24
viewsIs it possible to sign a lib event on a REST request and wait for the return?
I wonder if it is possible to sign an event from a third party lib, which in the case is Microsoft.Speech.dll. Because, in my attempt, it did not work very well, ie, recognition does not happen and…
-
0
votes2
answers210
viewsError trying to access ASP NET MVC page C#: "HTTP 404. The Resource you are Looking for (or one of its dependencies) could have been Removed"
Hey, guys, a problem I can’t seem to solve. My project is ASP NET MVC5 with C#. I went to create another page in my project and simply when I run it is not recognized. I did the same way I always…
-
0
votes1
answer89
viewsGenerating Logs with Line Error and File Error (C#)
Eai guys, I’m trying to generate Logs for a web application. ASP, however I cannot find the correct C# method to find the Line and File where the error is occurring. Within the exception I found the…
-
0
votes1
answer142
viewsHow to assign a value to a select option (HTML element) and display data associated with that value? ASP.NET
I have a select that is being 'populated' as follows in my ASP.NET application: <select id="id_select" class="form-control"> @foreach (var x in listay) { <option value = "@x.nome">…
-
0
votes0
answers36
viewsSignalr Error: The connectionid is in the incorrect format
I have a web application that uses Signalr to display server notifications whenever a report is sent. Recently I have received the error below, but searching the internet did not find out what can…
-
0
votes0
answers160
viewsHow to Generate Qrcoder Image on screen using C# . NET Aspx with Qrcoder library
Metodo utilizando a biblioteca QRCoder. using QRCoder. public class GerarQRCoder { public static void GerarQR(TextBox txtQRCode) { string Cd = txtQRCode.Text.ToString(); QRCodeGenerator qrGenerator…
-
0
votes0
answers29
viewsValidation for Dropdownlist in ASP.NET MVC
I’m doing a project, I was doing a Dropdownlist that takes the database data and shows the user. To some extent everything went well, but it lacks a part of treatment, or a validation, because every…