Usually, web applications should be available in multiple languages other than English. In this blogpost, I am going to walk over creating a sample application that will be localized in French and Dutch. Usually, the preferred language is picked from the user’s browser settings. To make it a little tougher, we will allow the user to switch languages at runtime. To enable runtime switching of languages, we will add three link buttons in the master page.…
Year: 2011
ASP.NET UI
There are two Listboxes – list1 and list2. And four buttons. We want to move items from the one Listbox to another.
There is a:
- Add button to add selected items.
- Add All button to add all items.
- Remove button to remove selected items.
- Remove All button to remove all items.
We are using classic ASP.NET Web forms.
<div> <asp:ListBox ID="list1" runat="server"> <asp:ListItem Text="One"></asp:ListItem> <asp:ListItem Text="Two"></asp:ListItem> <asp:ListItem Text="Three"></asp:ListItem> </asp:ListBox> <asp:Button ID="btnAdd" runat="server" Text=">" /> <asp:Button ID="btnAddAll" runat="server" Text=">>" /> <asp:Button ID="btnRemove" runat="server" Text="<"/> <asp:Button ID="btnRemoveAll" runat="server" Text="<<" /> <asp:ListBox ID="list2" runat="server"></asp:ListBox> </div>
jQuery
The jQuery code for moving items is simple enough.…
LINQ to XML allows to manipulate XML documents using the familiar LINQ syntax. It is available in System.Xml.Linq
assembly. Prior to LINQ, the classes in System.Xml
assembly were used to manipulate XML documents. In this post, we will compare the newer LINQ to XML assembly with the older assembly.
Create element
Old way
XmlDocument
class is central to System.Xml
assembly.…