- GlassFish Application Server: Introduction (WMT-SAS-1536)
- Designing Java Web Services (WJ-4112-EE5)
- Adding Quality of Service and .NET Interoperability to Web Services (WMT-SAS-1543)
- Creating Reliable and Secure Interoperable Web Services (WMT-SAS-2544)
- Creating Transactional Web Services (WMT-SAS-2545)
- Working With the Web Services Policy (WMT-SAS-2546)
Thursday, 29 January 2009
Thursday, 22 January 2009
optgrouptag in their standard DropDownList asp control so it's not possible to group items on the list.
Most of the workarounds found in Web suggest use of Control Adapter, like this one. However, there are couple things I don't like in this solution:
- Doesn't work correctly when DataSource, AutoPostBack or OnSelectedIndexChanged attributes are set
- Overrides regular regular behaviour & rendering of DropDownList items
- Works for all DropDownList controls on the page (cannot be switched off for some lists)
System.Web.UI.WebControls.ListControl. When overriding it is very useful to base on original implementation so the default behaviour is preserved. To get the original RenderContents method's code you can use .NET Reflector:
So, your custom list control needs to look as follows:
namespace MyNamespaceOnce you create your custom DropDownList you can use it on a page just like any other control. You only need to register it explicitly using following directive:
public class MyList : System.Web.UI.WebControls.DropDownList
protected override void RenderContents(
// Custom implementation goes here
<%@ Register assembly="MyAssembly"
<ma:MyList ... />
Advantages of this appraoch:
- Original behaviour is preserved.
- You can use custom control only if you need grouping without affecting the rest of drop-downs on page
- You can implement several custom drop downs with different customizations
- Should work with AutoPostBack & OnSelectedIndexChanged
Saturday, 17 January 2009
widthattribute does the job (as expected). However, for some strange reasons it is completely ignored by FF.
To change the width of FileUpload control in FF you have to use
sizeattribute instead. Example:
<asp:FileUpload ... size="50" />The units used by
sizeattribute are characters. Remember to use both
size(for FF) and
width(for all other browsers) to make the change visible for all users. Sometimes it may be tricky to make this field have the same width on all browsers.
I'm not sure why Mozilla did it this way but I don't like it at all. Any Ideas?
I found solution here.