Archive for 'ASP.NET' Category

HowTo Filter System.IO.Directory.GetFiles with Linq

30 May 2008

Here we are going to see an easy way to enumerate files in a directory, filter the files with Linq, then bind the results to a ASP.NET repeater control. We will show you the old .NET 1x way of doing this, then the new and improved Linq way of doing this.
I had a method that [...]

Querying Selected Items From ListItemCollection Using Lambda Expressions

27 May 2008

You can use Linq and Lambda expressions along with the new extensions provided in the .NET framework 3.5 to filter those old school specialized collections like ListItemCollection. The key is to first convert the collection to a generic list using the Cast or ToList extension methods …. more on this in this article

ASP.NET What Server Side controls require a Server Form

7 June 2007

This is a list that I have compiled of ASP server side controls that require or do not require to be nested inside of a server form (form runat=server)

Requires
Does not Require

 
asp:Label

 
asp:HyperLink

asp:TextBox
 

asp:Button
 

asp:LinkButton
 

asp:ImageButton
 

asp:DropDownList
 

asp:ListBox
 

asp:CheckBox
 

asp:CheckBoxList
 

 
asp:Image

 
asp:ImageMap

 
asp:Table

asp:BulletedList
 

asp:HiddenField
 

 
asp:Literal

asp:Calendar
 

 
asp:AdRotator

asp:FileUpload
 

asp:Wizard
 

 
asp:Xml

 
asp:MultiView

 
asp:View

 
asp:Panel

 
asp:PlaceHolder

 
asp:Substitution

 
asp:Localize

asp:GridView
 

 
asp:DataList

asp:DetailsView
 

asp:FormView
 

 
asp:Repeater

 
asp:XmlDataSource

asp:Menu
 

asp:TreeView
 

Webservice fix for error message - Maximum request length exceeded

19 March 2007

So I ran into a weird error this morning on one of my webservices. It was a SOAP exception which yielded a 500 HTTP Status error (as viewable from the trace.axd)
“There was an exception running the extensions specified in the config file. –> Maximum request length exceeded.”
The WebService call was posting a DataSet to a [...]