Questions tagged [asp.net]

ASP.NET is a Microsoft web application development framework that allows programmers to build dynamic web sites, web applications and web services. It is useful to use this tag in conjunction with the project type tag e.g. [asp.net-mvc], [asp.net-webforms], or [asp.net-web-api]. Do NOT use this tag for questions about ASP.NET Core - use [asp.net-core] instead.

Filter by
Sorted by
Tagged with
0votes
0answers
4views

aspx.net uploading files to a server side

i have 2 pages, 1 page send an id number that i will use to upload data from database later own. i send this id number through the url - location += "fileUploadPage.aspx?"+ ID". then i ...
user avatar
  • 1
0votes
0answers
14views

Merge two rows or more tables into single row based on a column using LINQ C#

I have two Tables And I want output of both tables like this using linq C# . I have sample tables here click to check Tables
user avatar
0votes
0answers
15views

ASP returns HTML but `<script>` text content rendered in `<body>`

I have a API action that returns HTML like this: [Route("view/{id}")] [HttpGet] public async Task<IActionResult> View(string id) { var html = ... // Load from DB return Content(res....
user avatar
0votes
0answers
12views

Render angular.js template on click href

Hei friends,I'm kind rusty on mvc I need help. This is the cshtml ,my html and script is in the same page ,I want to render angular html Without refreshing page: @{ var condition=false; } <a ...
user avatar
0votes
1answer
10views

API request WaitingForActivation "Not yet computed" error via asp.net

this is my code via asp.net web form: public string GetAccessToken() { ServicePointManager.Expect100Continue=true; string accessToken = ""; System.Net....
user avatar
0votes
0answers
14views

What are the Parameters of Datagrid in Microsoft Fluent UI

I'm using the Microsoft Fluent UI library for Blazor. Basically what I'm trying to achieve is display data using the Datagrid component which is FluentDataGrid from Microsoft.Fast.Components.FluentUI ...
user avatar
0votes
1answer
16views

How to get client domain name or client IP Address which is trying to call web api in web api

I'm doing one project in Web API, So I want to get the client domain name or client IP Address which is trying to call my Web API. Is there any way to get the same. I'm waiting for your valuable ...
user avatar
0votes
0answers
14views

How to make fast row calculation in gridview asp.net

I am developing asp.net webform application with gridview control. I have grid control which is having more than 20 rows. Each rows having 4 columns like Ordered, Ex-Received, Current-Receiving and ...
user avatar
0votes
0answers
7views

Update C# compiler for ASP.NET ASPX pages using updated C# features

I'm working on an older website running on .NET 4.8 and using C# 11, but still using ASP.NET technology. I've introduced a few record classes throughout the codebase, but when I reference those in an ...
user avatar
  • 19.9k
0votes
0answers
14views

How can I include a date (mm/dd/yyyy) in a web form using ASP.NET framework?

I use Microsoft Visual Studio 2022 and I want to add a date input type in my web form using ASP.NET framework but the problem is though ASP.NET has a Calendar method (<asp:Calendar></asp:...
user avatar
0votes
0answers
11views

javax.net.ssl.SSLException: Broken pipe error while sending image to server

i have a update profile activity, and i send the new data to my asp.net server for database updating. when i attempt to upload a new profile image to my server after converting it to base64, i get a ...
user avatar
-1votes
0answers
15views

Multiple DDL in Gridview should populate with different options

Currently I'm trying to populate 2 columns in a gridview with dropdown menus, but only show the DDLs when a specific category of items is in the gridview. As of right now, I have the DDLs showing ...
user avatar
  • 214
0votes
0answers
10views

Best way to update Database with List where items have been deleted

I'm working on a recipe Webapp with Asp.NET 6.0 and Razor pages. There are three database tables : recipe, ingredient and food. Each Recipe has a Name, Preperation and list of Ingredients. I like to ...
user avatar
  • 1
0votes
0answers
15views

How to solve this Data is null error after extending IdentityUser razor .net6 EF

I extended the IdentityUser in my app: public class ApplicationUser : IdentityUser { [Required] public string? Name { get; set; } public string? StreetAddress { get; set; }...
user avatar
  • 421
-2votes
0answers
38views

.net web development using c# namespace errors

C#: using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI....
user avatar
0votes
0answers
23views

Versions of MySQL prior to 5.6 are not currently supported

Recently my web host decided to switch to MariaDB from MySQL. Since then, I get the following error whenever a page tries to connect to the database. "Versions of MySQL prior to 5.6 are not ...
user avatar
-1votes
0answers
19views

Select Data from Column in Table which Field ID Increments | Procedure Expects Parameter Which was Not Supplied

I'm trying to get data from a column (AlbumCover) from a table (Albums), where the ID of the row increments. (using the identity specification property). Problem is, I can't create a stored procedure ...
user avatar
-4votes
0answers
29views

Async/Await in C# [closed]

I new to programming and I have a question regarding asynchronous programming. So if I have an async method and the caller of that method uses await to get the result, the application stops until the ...
user avatar
0votes
1answer
51views

Using JS in Blazor

Currently, I'm assessing viability of Blazor for our projects and I want to better understand JavaScript's role in a Blazor project. Microsoft documentation states the following: Only mutate the ...
user avatar
  • 22.2k
0votes
0answers
9views

How can we add DI (Dependency Injection) of a class library to multiple projects in C# asp.net 6

here I am trying to add dependencies from SchoolAppASPv2.Infrastructure to SchoolAppASPv2.Identity but I am not being able to. It shows an error in using SchoolAppASPv2.Infrastructure using Microsoft....
user avatar
  • 21
-1votes
0answers
17views

Able to publish, but receiving "Object reference not set to an instance of an object" error [duplicate]

I am new to asp.net and have created a Gridview matrix application that ran fine and runs fine in testing. Now when I publish i receive "Object reference not set to an instance of an object.&...
user avatar
  • 59
0votes
0answers
24views

Override Appsettings.json configuration based on runtime values exploiting the standard IConfiguration behaviour

I'm wondering if there's a way to exploit the standard IConfiguration, IOption override functionality to override appsettings configuration values based on per request evaluated data. I have a multi ...
user avatar
  • 103
1vote
1answer
23views

Send image from ASP.NET Web API to Angular client

I just finished my photos upload functionality. I'm storing images in folder after upload and I'm storing path to them in my database. I want to display this photos in my Angular client and I don't ...
user avatar
  • 21
0votes
0answers
14views

ASP.NET Core 6 - hide minimal api endpoint from swagger explorer

I have an implementation that requires the use of minimal APIs. But somehow, there is no way to exclude this from the swagger API explorer. In an MVC controller approach, we can hide endpoints using ...
user avatar
  • 690
0votes
1answer
15views

Cannot implicitly convert System.Data.SqlClient.SqlDatReader to AdoControls.SqlDataReader

I'm learning ADO.Net and have been performing SQL commands on GridView. Today I started to learn the SqlDataReader In ADO.Net and when I try to Execute my Command and pass it to the SqlDataReader ...
user avatar
-1votes
0answers
15views

How to secure a .NET 6.0 Web API to be used by an .NET Framework MVC app

I'm responsible for an old ASP.NET MVC web site. I'd like to do new stuff in .NET 6.0. My idea is to put all new database access code in a .NET 6.0 Web API. This would only be used from the old web ...
user avatar
  • 447
0votes
0answers
13views

How Can I Save Link Which Cached Page (ASP .NET OutputCache)

I use ASP.NET MVC outputcache mechanism. But i need to save link which it's requested. But if a page is cached so i can't save the link because controller's code is bypassed of course. What can i do ...
user avatar
  • 1,552
0votes
0answers
29views

Opening the older solution with visual studio 2022

I am trying to switch from Visual Studio 2019 to Visual Studio 2022Codes runs fine but shows CS0103 The name 'Color' does not exist in the current context in Visual Studio 2022 Code gets executed and ...
user avatar
0votes
0answers
24views

Cant receive actual error message on client

I have asp net project, i tried call .asmx web service from .aspx page via ajax js. When my web.config file is configured to customErrors mode = On, i receive default error message like "There ...
user avatar
  • 1
0votes
1answer
13views

Http Response Headers and URLRewrite headers only applying to Https calls not Http

Hi so I have been adding the needed headers to my site in IIS specifying them in 'Http Response Headers' like so... I am also setting an Outbound Rule using UrlRewrite to remove Server details... ...
user avatar
-3votes
0answers
31views

How do I add a razor component to a list in c#

Razor Components My class and list I want to keep my razor components in a list like in the image, and then show them in a drop zone. Is this possible?
user avatar
0votes
0answers
8views

ASP.NET bind menu to XML file

My XML file is structured like <menuItem> <text>Some Name</text> <url>../page.aspx</url> <submenu> <menuItem> ...
user avatar
0votes
1answer
33views

Error 400 when trying to post Angular form information into ASP.NET Core API

I'm a newbie in Angular. I tried to follow a tutorial from YouTube and make a simple Angular app for doing CRUD operations. The angular version is 13. The API I'm using is ASP.NET Core 6. I wrote code ...
user avatar
0votes
0answers
13views

when i publish the project the identity ask me log in each page authrized by identity

I made project with asp.net 5 and identity, the hosting is remote windows server with iis the issue that happened when I open a page that authorized identity to ask me to log in again
user avatar
2votes
1answer
25views

ASP.NET ViewState vs Session, big amount of data

I have a WebUserControl that get Records from SQL and store inside a ViewState, this has worked fine so far. but now i have a DataSet with 100k+ records and i noticed that at each PostBack the XHR ...
user avatar
-1votes
1answer
15views

ASP Classic Method to Extract City from Address String

I am looking for a method to extract only the city from an address string in ASP Classic, is there a way I can do this, or resources i can read? eg: C. del Esperanto, 17B, 03503 Benidorm, Alicante, ...
user avatar
0votes
0answers
18views

CORS issue in asp.net core 3.1

If I miss any information in my question, please let me know and I will make up for it.I've read the same topic article on Stackoverflow, but it doesn't help me, I'm currently learning to use ...
user avatar
  • 49
0votes
0answers
14views

Azure uploaded files path

When I Upload a file and after that click on Direct Azure Path it took me to (Redirect) sign in Page string fileData = request.DocumentData.Split(',')[1]; string fileExtention = GetFileExtension....
user avatar
1vote
0answers
47views

C# - Unable to Post byte array data

I am trying to scrap data from this aspx link. I was able to successfully fetch the desired data using python. However, I have to do the same in C#. I first post request to the page to fetch the ...
user avatar
-1votes
1answer
19views

Notify caller function about process updates by callee in C#

I have a c# program which calls the function, the callee function, does some processes within a for loop. Now i want, as soon as the iterations are completed in the for loop, the caller function ...
user avatar
  • 4,790
-1votes
0answers
13views

ASPX Deserialized json

SO this isnt my code but this aspx cs code function isnt wokring and is returning Object serialized to Null. JArray instance expected. when i use http://localhost/FleetManagement/Tasks/RunTasks.aspx?...
user avatar
0votes
0answers
18views

System.Data.Entity.Core.MetadataException: 'Unable to load the specified metadata resource.' 2022

[Enter image description here] 1 I got this error when I tried to run the system. I am not sure why. it used to display the information from a database. Please check the image. My connection string is ...
user avatar
0votes
1answer
19views

Is it possible to add grpc services using different ports in Asp.Net Core grpc?

I have an existing .net core application that contains two grpc services (using grpc.core) . I have two servers Server serverA = new Server(channelOptions) { Ports = { new ...
user avatar
  • 75
-1votes
1answer
31views

Errro login in asp.net

I am trying to make a login in asp.net but the values I am entering are not being taken. I have the following lines of code: [HttpPost] public ActionResult Index(Usuarios log) { var usuario= db....
user avatar
  • 1
0votes
3answers
39views

Conversion failed when converting the nvarchar value to data type int sql server

I have a table. There is data in this table and there is a checkbox next to each data. Multiple selection is possible. After the user makes a selection, the id numbers of the selected columns are come ...
user avatar
0votes
0answers
16views

Why is my OData POST body to model not working?

I am using OData v4 in an ASP.NET application. Every time I use Postman to post to my endpoint, I get the following error. The issue is with this line public IHttpActionResult Post([FromBody] ...
user avatar
  • 2,423
3votes
1answer
25views

What does '/p:' on the Windows Command Line mean

I want to name the environment in the command line when using dotnet publish. I found this solution dotnet publish -o site /p:EnvironmentName=Production I've never seen that /p: argument before and ...
user avatar
0votes
1answer
27views

How do I prevent __DoPostBack refreshing an ASPX page?

I have a JS function in an ASPX page that performs a __doPostBack to a vb.net code behind. The problem is that it is forcing the page to refresh. How can I prevent this? My code below... JS: ...
user avatar
-1votes
0answers
28views

Sending a form submission into a database whilst using email function

I am trying to create a form which inserts data into my database whilst sending an email to me. I have tried everything but nothing seems to work. The data stores into the database however I don't ...
user avatar
  • 9
0votes
0answers
16views

asynchronous process structuring in .net

I'm working on a process that takes an excel file, does some review of the data and adds it to a datatable to later save it in the DB. In the review that must be done, in some cases the intervention ...
user avatar
  • 1

15 30 50 per page
1
2 3 4 5
7350