checking if a list web control contains an item

when setting the selected value in a radiobuttonlist or other list web control in asp.net, it is prudent to check whether the list contains the option you intend selecting first! this avoids those annoying “out of range” error messages. one way of doing this is to use code similar to the following: if not myRadioButtonList.Items.FindByValue("whatever") …

Read more

The server committed an HTTP protocol violation

Thanks to Communication WEB for pointing out a fix to this error which started springing up after .NET Framework 1.1 SP1 was released. To enhance security, this error will be raised on fetching from a web site if the server’s HTTP headers obey certain rules e.g. there cannot be a space in the header name. …

Read more

looking for isnumeric in vb.net?

i was wondering why a vb.net class file was throwing up errors when i called the isnumeric function the other day. after some googling i found out from roy osherove’s blog that you now need to import the microsoft.visualbasic namespace to use this and a bunch of other once standard functions. as an aside, if …

Read more

mm:dataset not well formed errors

if you are using dreamweaver mx to code asp.net applications you will probably be using a lot of mm:dataset tags. if you ever need to edit the commandtext attribute of the mm:dataset tag, you may well see the charming error message “The server tag is not well formed”. one possible reason for this error is …

Read more