ASP.Net Archives - All Things DotNetAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

ASP.Net Category

You’ve just entered a new stored procedure and you run your web page which uses it and WHAM! – you get this error message. Luckily, it’s not too bad.

Let’s say your’re trying to run your MVC application in Visual Studio, but you get the error in the subject line whether you run it with our without debugging. If you search for a solution to the problem, just about all you’ll see over and over is to set your Web project as the ‘Startup […]

September 8 , 2015 | | In: ASP.Net, ASP.Net Tips

Working With QueryStrings

In .Net, sometimes, you must work with a querystring with many parameters and then, based on that, you must assign values to labels, textboxes or the like. Fortunately, it’s not that hard. Here, I’ll break it down into three parts – grabbing the entire querystring and then getting the individual parameters, followed by assigning them […]

August 20 , 2015 | | In: ASP.Net, SQL Server, SQL Server Tips

Change UTC DateTime to Local Time

Recently, I found out our SQL Server was storing events in UTC time. An application I was creating needed to get a list of events that happened on a certain certain day. Since our Central Standard Time was a little off, I had to come up with a fix for this. I had a parameter […]

August 19 , 2015 | | In: ASP.Net, ASP.Net Tips, C#

Get Local Computer Name from Website on Server

Let’s say you’re on a computer with which you need a website on a server to have information about. First, you want the computer name you’re on. In my case, I ran the page on the website from a remote computer and I needed a textbox to default to the computer name where I was. […]

May 26 , 2015 | | In: ASP.Net, MVC

IISExpress VERY Slow Loading

In the output window, I started getting notices for every dll in the references like: “‘iisexpress.exe’ (Managed (v4.0.30319)): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_32\” among all kinds of notices – literally a website that took normally a few second to load during debugging sometimes took minutes or didn’t load at all.

March 19 , 2015 | | In: ASP.Net, MVC

Using HTML Tags in ViewBag

If you have html line breaks, links or other HTML tags that you’d like to use in a ViewBag, it’s not as hard as it seems. At first I tried Html.Encode/Decode, but that didn’t work. It seemed like the things I tried just kept adding to a list of items that proved you couldn’t do […]

January 8 , 2015 | | In: ASP.Net, VB.Net, Visual Studio

Me Keyword Doesn’t Work

Let’s say you still use VB.Net. Also, for some reason you notice that your ‘Me’ keyword no longer works (not recognized by intellisense) and that your application startup subroutines errors out and says “Event ‘Startup’ cannot be found”. It sounds really catastrophic, but for me, it wasn’t that big a deal. In the Application button […]

January 6 , 2015 | | In: ASP.Net Tips, MVC

Prefill Textboxes with Decimal Format

Let’s say you’re getting data from a database, and some of the data is null (maybe it’s an integer). A very common approach is to iterate through a table: dtEmployees = emp.Get(sqlGetEmployees); foreach (DataRow drEmp in dtEmployees.Rows) … ptt.Fieldname = drEmp[“Fieldname”] != DBNull.Value ? int.Parse(drEmp[“Fieldname”].ToString()) :0; That will populate the page with a ‘0’ for […]

In this, I’m using VS.Net 2013. As you know, you can easily debug with VS, but did you know you can debug your Javascript/JQuery also? In the image below, see that all you need to do is add the line: debugger; (red arrow) This will start debugging in your script. Just comment it out or […]



All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF


If you find this site helpful,
please donate to help keep it online and free





Code 'n' Sprox   DreamTemplate - Web Templates

Follow us on Twitter

Follow AllThingsDotNet on Twitter


Test - The Name: 6936