You probably know that, in order to retrieve the currently logged in user in ASP.Net, you would use this code snippet: System.Web.HttpContext.Current.User.Identity.Name() This returns the current user in the DOMAIN\USER format. But sometimes, all you want is the user name itself, without the Domain and slash. Here’s a function you can use to do this:
Knowing the environment variables in your program can sometimes be a very important aspect of your application. It’s very easy to get a list of and to use any one of the environment variables however you need it.
Most people know that, with a string in ASP.net or WinForms development, you can use the replace function to replace certain characters within a string with others. And, you probably know that you can even remove characters alltogether, using the replace function.
The basic concept of displaying data from a database is an essential core concept of ASP.Net. At that core, we have the GridView, which is one of the most used Table-type display devices in ASP.Net Here, we will show the basic code needed to get this accomplished on an ASP.Net web page and since the […]
When ADO.Net was being built, they built it with XML in mind. It’s very easy to extract XML data from a DataSet in ADO.Net.
The basic contact form you would create would only have a text box for comments. However, you could also have a dropdownlist for the user to choose a subject, etc. The last thing you would need is a button, which, in it’s click event will have the code necessary to send the email.
If you’ve created a project (let’s say a class) in Visual Studio 2010 and you’d like to change the target framework, in C#, it’s very easy to find.
I have found that, there are times when you need to deal with HTMLControls, using ASP.Net or SharePoint in code, rather than with a design surface. The situation then becomes how to deal specifically with CSS styles within the code. Naturally, it’s fairly straightforward in the mark-up, either doing it directly in the tags, or […]
I know, to some of you, this will seem like a ridiculously basic question/post. But since it was posted on one of the forums recently, and I had many problems with head hunters/recruiters on this, I thought it might be worthy to create a post about it. The question was: “What’s the difference between ASP.net, […]
Did you know that, if you use the App_Code folder in your C# application, you can also use VB class files in your project?
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF