Click here to Skip to main content
15,906,708 members
Everything / Web Development / ASP.NET / ASP.NET4.0

ASP.NET4.0

ASP.NET4

Great Reads

by defwebserver
You can easily create a Bot and deploy it on Facebook.
by Florian Rappl
Crawling tons of (individual) web information and creating statistics using Windows Azure.
by kannankeril
This article is an attempt at splitting out the controller layer to reduce its complexity and improve quality and maintainability of the resulting code.
by Sami Pylkkänen
Article shows how to setup ASP.NET 4.5.2 and ASP.NET 5 projects for Angular 2 application and how to enable Angular 2 typescript debugging in Visual Studio.

Latest Articles

by Lance Ford
Use an IIS module to identify the node that served a request in a web farm environment.
by Herman.Instance
AjaxControlToolkit Accordeon's bad influence on Gridview PagerTemplate
by Zijian
Generate strongly typed client API in C# for ASP.NET Web API and .NET Core Web API supporting desktop, Universal Windows, Android and iOS
by Chris A. Johnson
Drag and Drop between Multiple Trees in Jquery using jstree

All Articles

Sort by Updated

ASP.NET4.0 

8 May 2024 by danash
The problem was my Dev environment was hooked to Starlink satillite Internet which uses a NAT (network address translation) to household consolidate my IP address into one outbound IP. I pulled the ethernet cable from my desktop and used my...
29 Apr 2024 by Jean Vallee
ASP.net MVC App. Visual Studio 2022 App runs fine in desktop mode. This line: @using (@Html.BeginForm("SubmitForm", "Home", FormMethod.Post, new { id = "subform", verify = "Y" })) is generated correctly as:
20 Apr 2024 by danash
Using this code (below), Trying to obtain an access key via oAuth2 . Request runs fir about 2 mins then throws and error "request was cancelled". This is driving me nuts. Could use a second set of eyes and help. -Thanks Protected...
8 Apr 2024 by Rod Kemp
Sounds like you are running into a SPF,DKIM, DMARC authentication issue. SPF is a DNS record that tells the receiving email server if the sending server is a valid sender for the domain in the from field of the email. In your case you have the...
8 Apr 2024 by Member 11290735
using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using...
8 Apr 2024 by Pete O'Hanlon
As you are having a problem with a hosting provider, the best thing for you to do is to get in touch with GoDaddy and talk to their support team. You can find their support here[^].
21 Mar 2024 by Andre Oosthuizen
If you are using such an old version, you will be in for a few repairs as it will constantly give you unexpected results - How do I identify my Bootstrap version?[^] To align your image properly within the top menu, you can use the 'grid' system...
21 Mar 2024 by Dino the Sink
I am making a personal web page from ASP.net with Bootstrap with what appears to be v3. I have a Top menu with a handfull of links. I am trying to add images to the menu, but the alignment is not lined up. The image is showing up below the...
20 Mar 2024 by Thirumadhi T Johnson
in Outlook if we forward or create a new mail than the pdf file is converting with red colour fonts with underlines ..we use asp dot net 4.7.2 desktop application..We have customize button in MS outlook through this user can send email as PDF...
18 Mar 2024 by Pete O'Hanlon
Honestly, there's not enough to go on there. Does the code still build with the new panel or not? I can't really tell from your question whether it does. I know that you have removed the panel and the code is building when that's the case, so...
18 Mar 2024 by BobbyStrain
I have an older web page project that I added a panel control to. It fails to build as it does not recognize the new panel control. But existing panel controls work fine. This project was begun 18 years ago, as web pages. At some point it is...
13 Mar 2024 by BobbyStrain
I have files for download on my website. I believe it is ASP.NET 4.5. I would like to log each file download with the file name, user name, and date. The download is initiated with a link that is displayed via code in a placeholder control. I...
12 Mar 2024 by Maciej Los
As is stated here[^] you have several ways to achieve that. I'd suggest to read this also: File Download in ASP.NET and Tracking the Status of Success/Failure of Download[^]
12 Mar 2024 by Pete O'Hanlon
What you are asking for here only partially works if you require the user to sign up for the ability to download from your website. Even then, you are going to have to refine your requirements more as there are assumptions in there such as, do...
8 Mar 2024 by Andre Oosthuizen
Your first issue is happening with this code - return pc.ValidateCredentials(username, password); No credentials were found, returning a 'NULL' value. The second part then, based on the NULL value is - // Redirect to login if username is...
8 Mar 2024 by Gcobani Mkontwana
Hi Team I need some help, current issue my web form username is null. I think what i want to achieve, we are using our own domain server. My approach want this web app to be able to authenticate me as a user and be redirected to dashboard. For...
22 Feb 2024 by Maciej Los
Quote: as seen above last 2 row in datable is not in valid "dd-mm-yyyy" format Really? Take a look at below example: List lstOfDates = new List() { "22-07-2024", "23-09-2024", "2024-09-23", "1234-09-23" }; ...
15 Feb 2024 by Lance Ford
Use an IIS module to identify the node that served a request in a web farm environment.
15 Feb 2024 by Malikdanish
I have an asp.net mvc 5 application with individual user account security extended with user roles and centralized user administration (users can't create accounts, only application administrator, i.e. me, create accounts and assign roles to...
6 Feb 2024 by Hasin Mahjabeen
If you want to use checkbox instead of radio button. Here can be one solution - Use only one checkbox. If checked, it will mean "Yes", if unchecked, it means No. Dont use 2 checkbox for each yes and no option.
31 Jan 2024 by Herman<T>.Instance
Hi everyone, In asp.net 4.7.1. I am trying to use VNext capabilities to load a GridView. ItemType is set, SelectMethod is set. In code behind the public IQueryable GetData() is set. It loads data from a stored procedure. The datatable...
29 Jan 2024 by Herman<T>.Instance
In the OnSelectedIndexChanged all you have to do is call DropDownList.DataBind() and the SelectMethod will be executed and the data will be loaded in the DropDownList
22 Jan 2024 by OriginalGriff
Quite probably, you can't. Start by checking the excel source: unless the date is in a column that Excel recognises as a date (i.e. is formattable in Excel) then it's a string and can contain anything including valid dates, invalid dates, wrong...
22 Jan 2024 by Akshay malvankar
Hi convert data from excel to datatable now i want to validate the date format from datable using LINQ on datatable, My datatable Row id date 1 22-07-2024 2 23-09-2024 3 2024-09-23 4 12334-09-23 as seen above...
20 Jan 2024 by ahmed_sa
I work on asp.net MVC application I face issue when change check box (Yes to No) OR (No to Yes) not detect value true or false correctly . I have two check box Yes represent true value No represent false value I don't need to change checkbox...
15 Nov 2023 by Member 16140669
For the permission error "Filename: redirection.config\r\nError: Cannot read configuration file due to insufficient permissions\r\n\r\n", I added a new user called IIS IUSRS (put it in the name check area and check it to get the correct name) and...
11 Nov 2023 by ahmed_sa
I work on asp.net mvc page view . but I face issue search for every column not have same size of header as Request No for search filter not same width and height of Request No column Header table and if you check also Line Manager on header and...
27 Oct 2023 by ashwini gaikwad 2021
The provided method is for filling the data in dropdown list. First, the selected index of dropdown is -1 but after Databind() method line, the selected index becomes 0 and first item of the list gets selected by default. I tried to set selected...
25 Oct 2023 by Richard Deeming
A DropDownList renders as a HTML element. : The HTML Select element - HTML: HyperText Markup Language | MDN[^] That element (with a size of 1) does not support a "no option selected" state; if none of the rendered...
7 Oct 2023 by MichaelEriksen
I am developing on a c# web project with aspx pages and need to create a dll with several dialogboxes made of Panels and DIV's. It is possible for me to create a library and call it from the codebehind in my mainproject. But I can't put a DIV,...
13 Sep 2023 by pankajgarg1986
I am using iTextSharp PDF library to convert plain html into multiple pages PDF file. The problem is with printing footer on every page. I have tried everything, but nothing worked. Please help me to sort out this issue. Below is my complete...
29 Aug 2023 by ahmed_sa
I work on ASP.NET MVC auto complete project. I face issue I can't display Employee Name on input text Id LineManagerName when changing auto complete employeeId. Employee Id represents: @Html.EditorFor(model => model.LineManager, new {...
23 Aug 2023 by OriginalGriff
Never concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Always use Parameterized queries instead. When you concatenate strings, you cause...
25 Jul 2023 by programing pro
It is a control that is used to create a hyperlink. It responds to a click event. We can use it to refer any web page on the server. To create HyperLink either we can write code or use the drag and drop facility of visual studio IDE. This...
18 Jun 2023 by Akshay malvankar
Hi I try to upload file of 4Mb after click on upload button it give me below error Error : Application Error: Sorry page, you are looking for is not found in asp.net mvc i have written no validation code that will check size of file ,but it...
18 Jun 2023 by Richard Deeming
In IIS, the maximum request size is 4Mb. If you try to upload a file one byte larger, you will get a 404 error. You need to modify the request limits to allow for larger file uploads. That means modifying your web.config file in two places: ...
17 Jun 2023 by OriginalGriff
The error message you are getting is a 404 error: page not found. That has nothing to do with the code you show, it means that the page the user (or a redirect) is trying to access has an incorrect URL and cannot be located. I'd start by looking...
8 Jun 2023 by Herman<T>.Instance
AjaxControlToolkit Accordeon's bad influence on Gridview PagerTemplate
5 Jun 2023 by Gcobani Mkontwana
Hi Team What could have cause an issue with the reason cannot be found in asp.net mvc? I have created create operation and uses Get. could be the reason i am using httpPost? Please advice me, thanks What I have tried: using System; using...
4 Jun 2023 by Gcobani Mkontwana
Hi Team I am having an issue with my crud application, basically this application uses business logic, entity framework for specific reason of the requirement. But the problem is when View is created and try to run this file 'Order/Edit.cshtml...
4 Jun 2023 by OriginalGriff
To add to what Graeme has said ... When you create a class the system adds a hidden default parameterless constructor for you so that you can create instances: public partial class MyClass { public MyClass() {} // Hidden constructor }...
4 Jun 2023 by Graeme_Grant
No parameterless constructor defined for this object. This is quite clear... This is a parameter constructor class: public class MyParameterClass { #region Constructors public MyParameterClass(int param1, int param2) { } #end...
4 Jun 2023 by $ultaNn
I have multiple PDF as bytes in database, I want to convert byte to PDF and merge all files in one PDF. What I have tried: private void DocumentFile() { Document document = new Document(); ...
4 Jun 2023 by OriginalGriff
You can't just send multiple PDF files sequentially: you would need to combine them into a single PDF. Google shows the way: Merge pdf files C# - Google Search[^]
4 May 2023 by Vimalsoft(Pty) Ltd
Good Day all i took over a project (asp.net ) by a company that does not exist anymore , so some reverse engineering needed to be done. i came across a using using DynoLib.DynoForm; i cant trace this library to anything i know . looks...
4 May 2023 by OriginalGriff
Chances are it is / was proprietary to the company, but Google came up with some links: DynoForm C# - Google[^] I'd try contacting the author of the first link: FuelEconomyForm, ProScan C# (CSharp) Code Examples - HotExamples[^] and explaining...
24 Mar 2023 by robertotelles00
Dan Good afternoon My name is Roberto Telles ([EMAIL REMOVED]). I wonder if the HTML5 Event/Calendar Scheduler is still supported in the .NET MVC framework. Would it be an old version of this component? Thank you very much in advance. Yours...
24 Mar 2023 by Richard MacCutchan
Who is Dan? If this message is in reference to a CodeProject article then you should use the forum at the end of the article.
28 Feb 2023 by Member 15938200
เถียงไม่ได้เลยว่าปี 2022เป็นปีของการหาเงินกับเกมgame slot เพราะเหตุว่าเป็นเกมที่เล่นแล้วสนุก ลุ้นมัน พร้อมกับการหาเงินไปพร้อมๆกันได้อีกด้วย ดังนั้นวันนี้ทาง Sloteasy168 จะมาชวนเปิดประสบการณ์ดีๆกับการเล่น เว็บสล็อตแตกง่าย 2022 ไม่ผ่านเอเย่นต์...
6 Feb 2023 by ahmed_sa
How to load data employee on view GetAllEmpDetails.cshtml based on drop down selected index changed? I work on MVC web application using c# by ado.net I face issue I can't display employee data based on drop down selected index changed . so ...
6 Feb 2023 by Richard Deeming
Split up your views: GetAllEmpDetails.cshtml @model IEnumerable @{ ViewBag.Title = "GetAllEmpDetails"; } GetAllEmpDetails
19 Jan 2023 by Kishor-KW
in my asp.net web-form project there is .cs file (code file) where i did database related connections and CRUD operation. Now I want to handle a exception if occurred, I used try catch block. When exception occurred it will be thrown but I want to show message to a user that perticulare...
23 Dec 2022 by Imene ZARAI
I want to retrieve the selected row to a separate text file I tried but my code just retrieves all the rows not the selected one please how can i do the selection process??? What I have tried: This is the controller action public...
22 Dec 2022 by OriginalGriff
The DataTable class isn;t directly displayable, so there is no mechanism for the user to select any rows within the DT, or for the DT itself to associate any rows with a "selection" Selection is a user interface concept, and needs a data aware...
13 Oct 2022 by Member 11143448
i am working with a .txt file data with 100+ columns and rows transferring into .csv format file and everything is working fine. but problem is , i am getting some exponential values e.g. 48123E+1 because those are larger in size which i don't want , so is there any way to format cell as text to...
13 Oct 2022 by Abisha Jain
Did you came to solution since I am stuck on same , please help!!
7 Oct 2022 by Ram Kumar(Webunitech)
I need a help only IE case. I have created a flight booking website and after selecting flight I have redirect to booking Page. I have create a webmethod in fligh booking page and this webmethod calling from ajax. After Click on book button then ajax function hit the webmethod function and...
20 Sep 2022 by koolprasad2003
Dear team we have implemented WebDav using asp.net and deployed it on IIS. Now when we try to edit any file on client machine with Word 2013/2016 then word prompts security warning as "The application experienced an internal error loading the SSL...
14 Sep 2022 by BobbyStrain
I placed a hit counter on my home page. It seems to get lots of hits. Is this mostly because of bots? What I have tried: I have a hit counter on another page which doesn't get many hits.
14 Sep 2022 by Francois D Viljoen
Where do you store the value of the counter?
11 Sep 2022 by Francois D Viljoen
It could be that your hit counter registers every time you run the web page locally from your development environment also? Normally, hit counters shows more information on the analysis page - maybe look there for more information.
24 Aug 2022 by Member 15747062
Hi have parent and child grid , i want to export both the grid data into single excelsheet. What I have tried: aspx code
19 Aug 2022 by jaganps
How to remove x-aspnet-version from response header for 400 and 404 status codes What I have tried: I tried adding the below code in web.config file I also added the below code in the Global.ascx.cs...
19 Aug 2022 by jaganps
Hi Richard Deeming, I tried but it will not work. The solution for the problem is to follow the below link Remove Unwanted HTTP Response Headers - Microsoft Tech Community[^]
18 Aug 2022 by Richard Deeming
https://serverfault.com/a/1511...
11 Aug 2022 by kaushik ahir
Problem is how get my whatapp Password in Whatapp Api......Please Give Idea or likeWhat I have tried:string nickname = "Test";string sender = "xxxxxxxxxxxxxx"; //My Phone Number tryed with 049xxxxxxxxxxxx, 0049xxxxxxxxxxxxxx, 49xxxxxxxxxxxxxxx, xxxxxxxxxxxxxxstring imei =...
11 Aug 2022 by Member 15734840
To get your password please use WART
29 Jul 2022 by Jennifer Jones
Hello- I inherited an asp.NET application written in C#. It is not a project and not associated with a solution; it is simply a collection of aspx files and their associated aspx.cs files. It's a programming mess, and I'm trying to rewrite it...
21 Jul 2022 by Muthu vj
HI I am Using Visual Studio 2008 . now i am trying to Connect the Oracle Database and Execute my WCF service. i am facing this Error while Execute it can you Help me on this. What I have tried: Oracle.DataAccess.Client.OracleException: The...
21 Jul 2022 by Maciej Los
Please, install proper version of Oracle connector! See: Oracle Data Provider for .NET Versioning Scheme[^]
20 Jul 2022 by Member 3811280
Dear Friends, Bank provides integration code but I am unable to integrate plz help me out. Amount Mismatch/Invalid Amount error show What I have tried: protected void Redirect_Click(object sender, EventArgs e) { //1. URL ...
6 Jul 2022 by itsathere
Hi, I am using asp.net web from and creating dynamic controls using javascript but not able to find control using their name. What I have tried: var files = Request.Files; List Settlement_Offer_Details...
23 Jun 2022 by Alaren
I have a webforms asp.net website which is using the standard menu control. we have a page that contains a html5 drawing canvas which is for gojs charting. When the menu expands, it seems to appear in front of the canvas itself, but behind any...
23 Jun 2022 by Alaren
Aha, found it, the menu needed to have the postition:relative added to make the z-index work.
20 Jun 2022 by Param From Mumbai
We are having a web application built on asp.net platform. We have lot of inline scripts and AJAX tool kit in the application. One of our client want to implement content-security-policy because they want to host application on public url. after...
12 Jun 2022 by ravitv
Friends, I need your help, please. I want to Count 'public schools' in each State(which is a column name) across all 50 States in USA(currently having 50 to 100 rows in sql server table named "tbl_PublicSchoolUSA") and display in 50 TextBox for...
12 Jun 2022 by OriginalGriff
Don't. Use a DataGridView instead. Use an SqlDataAdapter instead of the SqlDataReader to load the state and count into a DataTable, then set that as the DataSource for a DataGridView and it will organise it for you in a much more flexible way.
2 Jun 2022 by pmcm
I have an application that deploys code to various target servers. Recently Windows 2012 servers have been added as target servers but the application's agent service (which is installed as a service on each target) returns an 'Access denied' message when trying to perform any tasks linked to...
8 May 2022 by Ausquito games
Olá pessoal, estou precisando da ajuda de vocês. Tenho uma página asp.net(webforms) com os seguintes controles: 1 TabContainer e 4 TabPanel Quote: Hi guys, I need your help. I have an asp.net(webforms) page with the following controls: 1...
29 Mar 2022 by Member 13379347
I am new to Javascript and kinda struck at one point. So here is what I want to achieve: I have a user control (having a textbox and label)
24 Mar 2022 by Reuben Fevreau
So i have this app on iis which runs tasks to gather api data but when i enter this url "http://localhost/FleetManagement/Tasks/RunTasks.aspx?BatchSize=20&DelayedReload=true&AutoReload=true&GroupID=3" it gives me "Server Error in...
24 Mar 2022 by Richard MacCutchan
Object serialized to Null. JArray instance expected Your code is expecting an array to be passed in, but is gets nothing, hence the error message. You need to check the code to see what is supposed to be input to that API call.
15 Mar 2022 by Kumarbs
Hi all,I have been struggling to restrict static files to download from browsers. But not able to restrict. I know that the following code should work but not working.This is the root web.config file code.
15 Mar 2022 by Kumar Lachhani
You can restrict the folder with hiddenSegments introduced in IIS 7.0. You need to put the under in web.config. ...
12 Mar 2022 by ramesh penta
cmd = new SqlCommand("INSERT INTO [Login]([User_ID],[Password],[username],[email],[gender],[DOB],[Qualification],[Designation],[ContactNo],[Address]) VALUES ('" + txt_userid.Text + "','" + txt_Password.Text + "','" +...
10 Mar 2022 by Member 12690322
I have an update panel that exists on my Default.aspx page. When I try to access it from the Default.aspx.cs page it is saying that it is NULL and gets caught by the try catch. Below is the code from both pages. Any help identifying why it is...
2 Mar 2022 by Member 15542635
if (e.Item.ItemType != ListItemType.Header) return; _objTT.GridHeading(vid, e); //cT.date = Convert.ToDateTime((object)DateTime.Today.Date); //cT.a = Convert.ToInt32((object)Hidden1.Value); ...
2 Mar 2022 by Member 15542635
protected void vid_ItemDataBound(object sender, DataGridItemEventArgs e) { try { if (e.Item.ItemType != ListItemType.Header) return; _objTT.GridHeading(vid, e); string...
2 Mar 2022 by Member 15223619
I am tied to apply manifest file and service worker file but not worked in this project . please give some suggestion What I have tried: Please Help me Regarding to Ap.net c# Website to PWA APP
2 Mar 2022 by M Imran Ansari
Check the following link for conversion asp .net: Build Progressive Web Applications with ASP.NET Core Blazor WebAssembly | Microsoft Docs[^]
1 Mar 2022 by _Asif_
This should give you a hint if I have understood your issue correctly. if (vid.Columns[index].HeaderText == ds.Tables[0].Rows[j]["Day"].ToString()) { DateTime _tmp = dr["Day"] // assuming the object is DateTime. e.Item.Cells[index].Text = ...
1 Mar 2022 by OriginalGriff
If you have a DateTime value, then the day of the week is simple: DateTime now = DateTime.Now; string dayOfWeek = now.DayOfWeek.ToString();
28 Feb 2022 by Member 15542635
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) return; try { trActivity.Visible = false; btnSave.Visible = false; btnCancel.Visible = false; ...
28 Feb 2022 by M Imran Ansari
This is very simple and clear in you error message, there is no results were returned from your query. You should apply check before going to access value from table rows. if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { int LevelID =...
28 Feb 2022 by Maciej Los
I'm pretty sure that the error is occured in this line: int LevelID = Convert.ToInt32(ds.Tables[0].Rows[0]["LevelID"].ToString()); I'd check if ds.Tables[0] contains any row: if (ds.Tables[0].Rows.Count > 0) //your logic here...
28 Feb 2022 by OriginalGriff
We can't tell: we have no access to your DB, the data it holds, the stored procedure you are calling, or the values you pass to it as parameters. And you need all of that while your code is running (which we can't do in isolation) to begin...
23 Feb 2022 by Jineesh TR
Hi all, I have a table that contains a column of external website addresses. I need to list those websites in a table, and I did it. But what I want is, when I click on this link, the control should be transferred to the specified website in a...
18 Jan 2022 by Vivek.anand34
Dear Frnds,I need to export the collapse gridview to excel. i have the problem in this code. Type or namespace 'XLWorkbook' could not be found. what is the problem here. DataTable dt = new DataTable("GridView_Data"); GridView gvOrders =...
18 Jan 2022 by PaulaJoannAllen
It worked for me. Use the solution provided.
17 Jan 2022 by Sadia Rashid Jan2022
I have 4 tables in my database Users, Resources, Roles and a bridge table UserRoles. I have written a PUT Request to update records in User and Resources table and along with it I have multiple entries against Users in UserRoles table which is a...