All Things DotNet - Page 2 of 32 - All Things DotNet Discussed - Winforms/ASP.Net/SharePoint/WPFAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

Let’s say that in SharePoint, you want to use the Contribute permission level, but you don’t really want the users who have that permission level to be able to delete anything. It sounds harder than it really is.
Read the rest of this entry »

If you go to add a webpart, choosing the ‘Content Rollup’ category and you can’t find the Content Query Web Part, it’s actually a very simple fix.
Read the rest of this entry »

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.

Read the rest of this entry »

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 Project’. In rare cases, this may not be the solution to the problem.
Read the rest of this entry »

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 to whatever controls you have on the page. Read the rest of this entry »

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 in my .Net app called @evTime with the actual column named ‘eventTime’. I needed it to return rows for anything after midnight on that day up until midnight of the next day. So – here’s what I put in the WHERE clause of my stored procedure:

	--- blah blah blah
		eventTime)  >= @evTime
		< DATEADD(day, 1, @evTime))
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. It’s very simple. The code is:

string[] computer_name = 
    HostName.Split(new Char[] { '.' });
txtWorkStation.Text = computer_name[0].ToString();

(I have it on multiple lines due to space constraints here. There are only 2 lines. The one starting with ‘txtWorkStation.Text=’ starts the second line.)

Let’s say that you are in SharePoint and you have typed in a person’s name (into the people picker control) and even though you were sure you typed it correctly, it has been rejected as misspelled. Some people just don’t want to go to the ‘Open Book’ icon and search, due to time or whatever.

This is an easier way to skip that step and stay in the same location. At this point, you have a red, squiggly line underneath the name that did not work for you, along with a red message that ‘No exact match was found”. Don’t worry, it’s easy from here. Just right click on the text with the red squiggly under it (make sure the mouse icon is not the pointer/arrow, but the icon that you would use to insert text in that area).

What you should see is a dropdownlist showing you (along with ‘Remove’ and ‘More Names’) a list of names that are close to whatever you had originally typed, as suggestions. You can just pick one from there, double-click on it and it will change the wrongly spelled name to a correct spelling. That’s all there is to it.

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.

Read the rest of this entry »

April 10 , 2015 | | In: SharePoint, SharePoint Tips

Renaming SharePoint Groups

If you’ve forgotten how to do this and then searched the net to try to find out how to do it, you might have gotten frustrated since most of the examples on the net show you how to do it in Powershell.
Read the rest of this entry »


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