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
0
votes
0answers
8 views

How to add a default create .aspxFile to a ASP.NET Web Application Project?

I am working with Visual Studio 2019. I created a new ASP.NET Web Application project. I selected Empty. Then I click WebApplication1 project -> click on Add -> New Item -> But I can't find Web ...
0
votes
0answers
4 views

vscode on linux: omnisharp “problems” with aspnetcore: “The type or namespace name 'Authorization' does not exist in the namespace”

I have a project that works in VSCode on Windows, but when loading it on Linux it yields several "Problems": The type or namespace name 'Authorization' does not exist in the namespace 'Microsoft....
0
votes
1answer
21 views

How to get list asp.net web api identity users (and delete,put).. for ASP.NET WEB API?

IdentityModels.cs public class ApplicationDbContext : IdentityDbContext<ApplicationUser> { public ApplicationDbContext() : base("DefaultConnection", throwIfV1Schema: false) { ...
0
votes
0answers
12 views

Multiple select dropdowns are not selected after post

I am working on a .NET Core MVVM application, and I have a form that I'm submitting that contains many dropdowns, all of which are multiple-select. Upon Post, the form should redisplay the various ...
0
votes
0answers
30 views

HttpContent.ReadAsStringAsync causes request to hang

In ASP.NET WebAPi 2 code, I have a delegate handler public class RequestHandler1 : DelegatingHandler { protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage ...
0
votes
0answers
7 views

How to use Condition IF in DataGrid DevExtreme

columns.AddFor(ts => if (ts.value) { "Result"} else { "Result" } ).Caption("value"); //Similary this
1
vote
1answer
40 views

C# - Rendering a partial in a ternary operator

I'm conditionally rendering a footer using a ternary operator. I was doing @RenderPage, and even though it worked it meant having a controller as well as some other extra code. I'm running into a ; ...
0
votes
0answers
18 views

How can I log in ConfigureServices method using AspNetCore 3.1?

With Core 3.0, you cannot inject ILogger or ILoggerFactory to the ConfigueServices method anymore. With that being said, what is now best practice for logging inside the ConfigureServices method? I ...
-2
votes
0answers
34 views

What should I learn to create a HTTP server with C# for games? [closed]

I'm new to server programming, I have beeing creating small Unity games using C#, and now I need a simple server just for players to login and save their progress, maybe also generate some random ...
-3
votes
0answers
25 views

i already tried to enableevents..=false but i does not take me to the desire page, instea it redirects me to the same page [closed]

[i already tried to enableevents..=false but i does not take me to the desire page, instea it redirects me to the same page when i try to press the details button instead of taking me to the next ...
-1
votes
0answers
14 views

set shadow property in asp core and dapper

i using dapper for insert , update , delete in database . i need to set value for some property like ip , userId , userAgent . i using this code : public static void ...
-1
votes
0answers
11 views

ASP.NET linking a datalist to a shopcart page [closed]

I'm tying to link a DataList that i have made and it contains 5 books to a shopping cart so when I click the button under the book it adds it to the shopping cart page the problem that I've been ...
0
votes
1answer
14 views

Control 'windowMasterSearchBox' of type 'TextBox' must be placed inside a form tag with runat=server

Not sure where I'm going wrong in terms of not having a windowMasterSearchBox placed within a form tag with runat=server. I'm getting the following error: Control 'windowMasterSearchBox' of type '...
0
votes
0answers
25 views

ASP.NET nested panel not displaying content

I'm working in ASP.NET and I have a panel that has controls inside it, including a nested panel that I'm trying to add controls to in the codebehind. The code runs without error, but the nested panel ...
0
votes
0answers
4 views

Task Runner Explorer ASP.NET - Block-scoped declarations not yet supported outside strict mode

I have been getting this error for days now and I am not sure how to fix it. When I run the "dev" package in Node Task Runner Explorer it gives this error. It seems to be something to do with ...
3
votes
2answers
58 views

Stored procedure expects parameter but parameter is actually supplied?

I need to know why I am still getting this error Stored procedure expects parameter which was not supplied But I am actually sending this parameter. The stored procedure in the database looks ...
0
votes
0answers
23 views

Correct way to link ASP.NET with User authentication

I am developing an app that requires a user to login using Firebase authentication. I do this using the official Javascript library, which works fine. However, for accessing the database and ...
-1
votes
0answers
16 views

How it fixed error in connecting to SQL Server? [duplicate]

The error: Internal system error, please retry the connection. Network-related or instance-specific error while established a connection to the SQL Server Considerations: The SQL Server machine ...
-1
votes
0answers
9 views

set shadow property value when command is add or update when using dapper

i need to use ShadowProperty in my project . i using dapper in my project for contact to database . now i need to set value for properties when command is add or modefied. i know when i using the ...
-3
votes
2answers
40 views

Error developing web project + api + SQL Server + dotnet

I have to develop a small project that accesses a SQL Server table and returns a JSON on HTTP-REST. I tested a direct project to access my program.cs direct database and it worked, but when I tried to ...
-4
votes
5answers
101 views

Finding Min and Max using LINQ

I am trying to create a LINQ query that allows the user to select Either Min Or Max from a drop down that I have on my web page. If the user selects Min it will display the record with the lowest ...
-2
votes
2answers
38 views

c# 'HttpContext' does not contain a definition for 'Current'

I am creating a single page web application which will handle the posted data from microsoft azure webhook. I have created a Core web application and got prebuild files to run it on IIS. The issue is ...
0
votes
0answers
30 views

Form authentication happen on master page login form (ASP.NET C#)

I has make my login form to be included as a part of the master page, when i onclick the login button, then it will pop up a login form, then for form authentication, it required a login.aspx to ...
0
votes
2answers
31 views

Asp.net C# : Error of system can find the file specified when using serialising json values (dictionary)

I have the following code: Dictionary<string, string> values = new Dictionary<string, string>(); values.Add("key1", "value1"); values.Add("key2", "value2"); string json = JsonConvert....
0
votes
0answers
30 views

How to make cascading drop-down list using just one class?

I've already saw examples of that perfectly working but with two separate classes but I'm trying to do a cascading drop-down list just using a single class using ASP.NET MVC. My class: namespace ...
0
votes
0answers
12 views

Entity Framework Nested JSON Array [duplicate]

I am try to get JSON array with nested arrays using Entity Framework. I need out as Kitchen Id > Parent (Category) > Child (Sub Category) > grand Child (Menu Items ) GET API: api/GetKitchenMenu?...
-1
votes
0answers
12 views

login failed after clicking clicking nav bar [closed]

when i click on a navlink when i run my code i get this error and have no clue how to fix this. An exception of type 'System.Data.SqlClient.SqlException' occurred in Microsoft.EntityFrameworkCore....
0
votes
1answer
34 views

VSCode won't load static files like css and js when debugging

So I recently build a .net core 3.1 web app using Visual Studio on Windows, I then decided to copy the project over to a USB, move it to my Linux machine and keep working on it there. I managed to ...
0
votes
0answers
22 views

Get Next Image From File Using Ajax

I have an asp.net web application that shows photos from various sets. The files are on server and file locations stored in SQL database. I use the following code for getting the first image: System....
-1
votes
0answers
15 views

how to clear this directive eroer problem? [duplicate]

I have to use these two lines in my create.cshtml document. It's a Razor View. @model cmsProject.Models.Content @model IEnumerable<cmsProject.Models.UserAccount> Error said "The 'model' ...
0
votes
1answer
38 views

How to create an API with severals DB connections in ASP.NET

I need to create an API in .NET to connect and verify some data in several database engine (MySQl, PostgreSQL, SQL Server). I can make one connection, with I don't understand how to make more than one ...
0
votes
0answers
10 views

Error while upload content from one domain to another domain

I receive this error on page after uploading content from one website. I have website in two langauges and try to merge those websites. Website developed in dotnet. This is the error message I ...
0
votes
0answers
8 views

2 Binding domain name for angular 6 on IIS does not works for one binding name

I have a angular 6 App which is deployed on IIS with 2 binding name i.e. www.example.com and example.com but the site only work for www.example.com but for example.com it throws ...
-1
votes
0answers
5 views

System.InvalidOperationException: 'The object cannot be deleted because it was not found in the ObjectStateManager.'

hata alıyorum yardımcı olabilir misiniz System.InvalidOperationException: 'The object cannot be deleted because it was not found in the ObjectStateManager.'
0
votes
1answer
14 views

How to keep 'Absent' text in the place of 'Empty' cell base on Current HeaderName Date in gridview row data bound

Trying cell value should be 'Absent' if cell is empty base on headertext date less than and equal to today date that cell should empty, below 12,13 dates are matching with below condition but how to ...
1
vote
2answers
30 views

Why doesn't the JavaScript populate the text box here?

I have googled this quite a lot and must still be missing something. The method creates the pop-up dialog fine but the text box does not get populated when I press the button. <%@ Page Language="C#...
3
votes
1answer
26 views

Application Insights add username to telemetry

I'm trying to log the usernames for users in application insights when they are doing requests. I've been trying to do it this way as: public class AppInsightsInitializer : ...
1
vote
0answers
32 views

Azure Container Choices

I have 2 concerns about Azure that I'd like to get settled before I dive-in. Is there a way of having a common Layout/HTML across many WebApps? (eg; the menus, I don't want to have to update all the ...
0
votes
0answers
9 views

how to do integration testing for OData service in Asp.Net core 2.2

please anyone give an example that how to do Integration testing for OData service in Asp.Net core 2.2 please help me out...thanks in Advances
1
vote
2answers
41 views

IFormFile is returning NULL in ASP.NET Core 3.0

I already read similar posts as mine, but they didn't help. So what is happening is I am following kudvenkat's asp.net core mvc tutorial series. I have a simple form with some fields that work ...
0
votes
0answers
17 views

How to host asp.net webform dynamic website on plesk server?

I am uploded database of the website and also publish project through visual studio but run successfully what i do? If any setting required for this please tell me...?
-1
votes
4answers
59 views

How to convert my site to multi language supported site

I developed site using ASP.net & c# it support English language, but now i want to convert my site to Multi language supported site. Any one please explain, how to do it? and what are the ...
0
votes
0answers
26 views

How to fix code have select all asp:CheckBoxList within current table only in .NET C#?

How to fix code have select all asp:CheckBoxList within current table only in .NET C# , because I try coding with sample but can't select all asp:CheckBoxList within current table only. My snipplet ...
0
votes
0answers
12 views

No endpoint listening at (url) that could accept the message

Could someone Please look into below issue . We are facing this issue only in Production not in our lower environment(Stage/Dev/UAT) after deploying latest code . Error in ...
0
votes
0answers
18 views

Alternative code for services.BuildServiceProvider (in ConfigureServices) when migrating from ASP.NET Core 2.2 to 3.1

I have modular ASP.NET Core application. Back in the day of .NET Core 1.1 I build services (AddScoped, AddSingleton ...) in public void ConfigureServices(IServiceCollection services) method like this: ...
0
votes
1answer
31 views

Seeding Database in Asp.net Core, cannot create admin account

I'm trying to create a default admin account when I start an application. Now what I'm interested in is how to seed a database in asp.net core. I have a seed code that I run in the main program. It ...
0
votes
0answers
8 views

RadAjaxManager not working in staging URL

I am new to Telerik and I am facing 504 error for a script file in a page without master page in staging URL. Thus tabs and button functionalities are not working. Guessing it is an issue with loading ...
0
votes
1answer
31 views

Using select all in drop down list and display in grid view

I have two controls a textbox and drop down list to search the database. I have added all to the drop down list that will allow the user to see all the data in the database; if the textbox is empty or ...
-1
votes
3answers
45 views

Pass string from C# Code Behind Winforms application to a webpage textbox

I am trying to pass a string from a C# Winforms application to a webpage text box. The Webpage textbox looks like this: <input id ="sometext" class = "form-control-sometext clearable" ...
0
votes
1answer
33 views

C# - Conditionally loading a specific footer w/ a switch statement

In my _Layout.cshtml file I'm conditionally loading CSS files using a switch statement. If the url includes collA or collD, then New.css loads. If not, then Old.css loads. It's working and I'm glad it ...