html -> ajax -> asp.net 2.0 -> and back
January 30, 2006
I was reading an article about prototype versus atlas and decided to write this code.
It uses AJAX to grab a data bound dropdown list from an ASP.Net 2.0 control. The ASP.Net side of things requires no compilation or DLL because of new features in ASP.Net 2.0. I was able to bind an xml file to the drop down list on the client side (not really client-side but the server is transparent). So, with Javascript I was able to asynchronously ‘grab’ the control using the http request object. To make it easy, just use the XHConn library for the xhttp request.
the html page:
1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2: <html xmlns="http://www.w3.org/1999/xhtml" >
3: <head>
4: <title>asp.net control pull</title>
5: <script language="javascript" src="js/XHConn.js" type="text/javascript"></script>
6: <script type="text/javascript">
7: var myConn = new XHConn();
8: if (!myConn) alert('please get a new browser');
9:
10: window.onload = function getContent(){
11: var fnRet = function ( objXml ) {
12: document.getElementById('source').innerHTML = objXml.responseText;
13: }
14: myConn.connect("getDropdown.aspx", "GET", "", fnRet);
15: }
16: </script>
17: </head>
18: <body>
19: <h3>asp.net control pull</h3>
20: <div id="source"></div>
21: </body>
22: </html>
the aspx code:
1: <%@ Page Language="C#" AutoEventWireup="true" %>
2:
3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml" >
6: <head runat="server">
7: <title>control pull</title>
8: </head>
9: <body>
10: <form id="form1" runat="server">
11: <div>
12: <asp:XmlDataSource DataFile="XMLFile.xml" runat="server" ID="xml1" />
13: <asp:DropDownList ID="ddl1" DataSourceID="xml1" DataTextField="value" DataValueField="ID" runat="server" />
14: </div>
15: </form>
16: </body>
17: </html>
the xml:
1: <?xml version="1.0" encoding="utf-8" ?>
2: <items>
3: <item id="1" value="0001"/>
4: <item id="2" value="0002"/>
5: <item id="3" value="0003"/>
6: <item id="4" value="0004"/>
7: <item id="5" value="0005"/>
8: </items>
what would you use this for? I’m not sure yet but it may come in handy.
IE7 Beta Source Leaked
January 24, 2006
Oops, Microsoft’s IE7 beta code and screenshots are leaked on the net. Looks like we can see how Microsoft built its copy of a copied browser.
view from my parking spot
January 18, 2006
.flickr-photo { border: solid 2px #000000; }.flickr-yourcomment { }.flickr-frame { text-align: left; padding: 3px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }
This is the view from where I parked yesterday (7th floor) on the parking ramp.
viewing iowa from the interstate
January 18, 2006
.flickr-photo { border: solid 2px #000000; }.flickr-yourcomment { }.flickr-frame { text-align: left; padding: 3px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }
duff avenue, ames ia
January 18, 2006
.flickr-photo { border: solid 2px #000000; }.flickr-yourcomment { }.flickr-frame { text-align: left; padding: 3px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }
This was taken on highway 30 as I passed over duff avenue in Ames on the way home from work.
capitol outside office window
January 18, 2006
.flickr-photo { border: solid 2px #000000; }.flickr-yourcomment { }.flickr-frame { text-align: left; padding: 3px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }
I took this today when leaving the office. The view was better at dusk because there was no reflection but I left late and decided to take it anyway.
definitive resource for common .NET issues
January 18, 2006
Note You can install the .NET Framework version 1.0 on a computer that has the .NET Framework version 1.1 installed on it. There are a number of specific issues that you need to know about if you want to do this. For more information, see Managing Multiple Versions of ASP.NET.
Note If you have installed ASP.NET and the .NET Framework on a server and you then uninstall and reinstall IIS, the script maps will break and ASP.NET will not work. If this happens, you can repair the ASP.NET script maps with the ASP.NET IIS Registration tool (Aspnet_regiis.exe). For more information, see ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
Note If you install the .NET Framework version 1.1 on a domain controller, the installation does not create the local ASPNET account. Instead, ASP.NET applications run under other identities. On Windows 2000 domain controller servers, ASP.NET applications run under the IWAM_machinename identity. On Windows 2003 domain controller servers, ASP.NET applications run under the NETWORK SERVICE identity (regardless of the IIS isolation mode). Under some circumstances, running ASP.NET on a domain controller requires that you take extra steps to make the installation work properly. For more information about potential problems running version 1.1 on a domain controller, see article Q824308, “IWAM Account is Not Granted the Impersonate Privilege for ASP.NET 1.1 on Windows 2000 Domain Controller with SP4,” in the Microsoft Knowledge Base at http://support.microsoft.com. For more information about running version 1.0 of the .NET Framework on a domain controller, see article Q315158, “ASP.NET Does Not Work with the Default ASPNET Account on a Domain Controller,” in the Microsoft Knowledge Base at http://support.microsoft.com.
Read more…
Creating ASP.NET Web Applications
Chunking the work
January 13, 2006
Here is an excellent idea of using the chunking method of agile project management. The idea is to create value in the beginning by making progress rather than creating a plan that focuses on the end and one single almighty deliverable. Instead, consider the possibility of several progressive iterations throughout the lifecycle of a project.
In example, rather than delivering to a client an entire web application near the end of the development stage of the project lifecycle, give them the login page two days after the beginnning of the project. This, in effect, accomplishes two things. It gives your client an increased confidence in you that you are making progress from the beginning. It also gives your team motivation and increases their morale knowing that they are not simply spinning their tires in the mud and moving nowhere.
Chunking the work
a must read blog
January 11, 2006
Guy Kawasaki has recently created a blog. This is a must read for any business person or anyone in b-school. He has written many books. I am currently nearly done reading Art Of The Start, and it’s a great book about how to start a company. A must read for any entrepreneur.
Goodbye, SEO Push. Hello, SEO Pull
January 9, 2006
What does it take to get Google to recognize your site? Mike Grehan tries to explain…



