DropDownList Without a Button
The most common way to do something on your ASP.Net pags, using the selected item of a DropDownList is probably to add a button. Then, in the button’s click event, do whatever coding with that item...
View ArticleAdd a ‘Select’ Item to a Bound DropDownList
Many times, your DropDownList will be populated with specific items from a database. You might ask yourself “How can I add an Item at the top? – – maybe ‘Select’ or something like that. It’s very easy...
View ArticleCancel Validation for a Button
In your ASP.Net page, let’s say you have multiple textboxes, etc, for which you are using validation controls. Then, you also have a button, that when it is clicked, will fire those validation...
View ArticleSay ‘No’ to Labels – Literally
If all you want to do is to put pure text in a certain place on your ASP.Net page, try NOT to use a label. Instead use a Literal Control. There is more overhead, plus a label always puts an HTML Span...
View ArticleHelp! My Site Looks Awful in IE8!
Assuming you’re working in ASP.Net, don’t worry – there’s a temporary fix for you. It will force the browser to view the page in IE7 emulation mode (as if IE8 were running in what it calls...
View ArticleUse VB Class Files in C#
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? There are 2 things you need to do first. You just need to create a separate...
View ArticleDifferences – ASP.Net/VB.Net/C#
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...
View ArticleHow to Add Styles to HTMLControls in Code
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...
View ArticleContact Form in ASP.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...
View ArticleASP.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,...
View ArticleInner Workings of ASP.Net Email
Before you send an email, using ASP.Net, you need to understand the basics of how it works. The first thing you do is make sure you import the System.Net.Mail Namespace. In C#: using System.Net.Mail;...
View ArticleData at the root level is invalid. Line 1, position 1
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...
View ArticleDotNet EnvironmentVariables
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...
View ArticleASP.NET Page Level Impersonation
Sometimes, global Impersonation in the website may not be the correct solution for you. However, it is possible to provide Impersonation at the page level. To do this, you can provide Impersonation for...
View ArticleHow to Change Application Pool in IIS7
In IIS 6, for me, at least, it was very easy to change or assign the Application Pool for my ASP.Net application, but in IIS7, it’s a little klunky, to say the least (IMHO). So, here’s a run-down of...
View Article