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

ASP.Net Tips Category

When you get this error message, it’s basically a warning that what you are trying to insert into the database could be malicious, so it was blocked. This is the default for ASP.Net.

If you have tried to set the width of a control (like a table) in code, you probably have received an error since it’s expecting an integer/unit. However, it’s very possible to set the width as a percentage, and probably a little easier than you would think.

Sometimes it becomes necessary to create a solution and either you don’t have a solution file for your project, or your solutiion file has been renamed or has become corrupted. At that point, it’s not as straight forward as one would like in order to get it done. However, it’s not a laborious task at […]

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:

First – don’t panic – I realize you have no information when you get this error and you have no troubleshooting direction at all, but don’t panic. Help is on the way.

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.

March 23 , 2011 | | In: ASP.Net, ASP.Net Tips, C#, VB.Net, WinForms Tips

Using the Replace function

Most people know that, with a string in 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.

I got this error and it showed that it was in the web.config file of my website. It took me a long time to actually realize that it was NOT THE web.config, but in a folder that Visual Studio did not show as being in the project – – a ‘vti’ folder. The text of […]

January 19 , 2011 | | In: ASP.Net, ASP.Net Tips, Uncategorized

Miscellaneous SQLDataSource Facts

I was just going over a few notes, when I had a quick little project in which I needed a SQLDataSource control, and I thought I’d present what I found here.

December 31 , 2010 | | In: ASP.Net, ASP.Net Tips

ASP.Net Email Requiring Credentials

When you have a hosted site, many sites will just let you run the standard ASP.Net code to send an email, but some hosts now are requiring the login details (credentials) be put in the script you run, so as to authenticate your script.

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