Quantcast
Channel: All Things DotNet » ASP.Net
Browsing all 15 articles
Browse latest View live

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 Article



Add 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 Article

Cancel 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 Article

Say ‘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 Article

Help! 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 Article


Use 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 Article

Differences – 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 Article

How 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 Article


Contact 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 Article


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,...

View Article

Inner 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 Article

Data 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 Article

DotNet 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 Article


ASP.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 Article

How 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

Browsing all 15 articles
Browse latest View live


Latest Images