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

ASP.Net Tips Category

December 30 , 2010 | | In: ASP.Net Tips, C#, DotNet General, VB.Net, WinForms Tips

XML from DataSet

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.

October 6 , 2010 | | In: ASP.Net, ASP.Net Tips

Removing Time From Date in Gridview

Here is the scenario for this solution: You have a Gridview which is populated from a database, you are using BoundFields and one or more columns is a date, but it’s showing the time also. You want it to only use the Short Date format (01/01/2010).

One of the great string methods that was introduced in dotNet 2.0 is ‘IsNullOrEmpty’

September 16 , 2010 | | In: ASP.Net, ASP.Net Tips

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 ‘Compatibility mode‘).

September 16 , 2010 | | In: ASP.Net, ASP.Net Tips

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.

September 16 , 2010 | | In: ASP.Net, ASP.Net Tips

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 controls. That’s all well and good, but let’s say you have another button on this page which does something else entirely and […]

Navigation to controls in the toolbox has finally gotten easier now, in Visual Studio.Net 2010. You can actually type to get to the control you want. The sections in which they reside don’t even need to be open.

September 9 , 2010 | | In: ASP.Net, ASP.Net Tips

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.

September 9 , 2010 | | In: ASP.Net, ASP.Net Tips

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 that you need to do.

September 9 , 2010 | | In: ASP.Net, ASP.Net Tips

Change MasterPage Programmatically

In order to set the master page programmatically, you must use the Page_PreInit to do so. Otherwise, using the Page_Load event will not work. It would look something like this in code: Me.MasterPageFile = “~/myMasterPage.master”

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