by aherrick
20. August 2008 05:08
Okay I was working on testing the Autocomplete Extender on a site I am working on. I noticed something interesting when testing the search functionality. Take a look at what was going on:
Here is what the control source looked like:
As you can see, the SKU codes I was looking for started with "TEST". But if a bunch of junk text was included before the actual SKU, it would stay with it in the dropdown list. I finally found the solution by removing the "DelimiterCharacters" from the control. I hope this works for you!
On an unrelated note I accepted a full time position at Blue Horseshoe Solutions today, I am thrilled.
by aherrick
8. August 2008 07:08
Today I was working on some code to monitor my network speed (incoming and outgoing). I wrote a windows service to capture my bandwidth and dynamically create an xml file and upload it to my website. Every 30 seconds (time is totally configurable) I override the exisiting XML with an XML containing a fresh capture of my bandwidth speed. How I wote the service is another post for another day... However I do want to share some code I wrote to load the XML and update the text.
Here is an example of the XML file my windows service generates.
The XML file is named bandwidth.xml
I wrote a javascript function to attempt to read the XML file when it is in the same directory as my html file. See javascript function parseXML below.
At the end of the function I make use of setTimeout to call the function again the function after a period of time. In this case every 10 seconds.
I load the Javascript function using the body onload event.
body onload="parseXML()"
I have three span tags in my html. XML, upload, and download. I grab their IDs in the function and use innerHTML to replace the text. Try it out by loading the html in a browser and changing the xml values. Have some fun with it!
Check out the XML and HTML below to see the full code. Good luck!
bandwidth.xml (100.00 bytes)
index.html (1.43 kb)
by aherrick
5. July 2008 06:41
A while back I had the need to use AJAX in one of my web projects. After some searching, I gathered the files and code necessary to fully integrate AJAX functionality into my code.
If you have not already, download and install the AJAX Control Toolkit and ASP.NET AJAX Extensions. The AJAX Control Toolkit will give you access to a bunch of really cool AJAX controls and extensions to aide in development. Check out the Control Toolkit demo page here.
Once both are downloaded and installed, add the following references to your project.
Finally, add the following code to the appropriate sections of your web.config file.
ajaxbits.txt (3.20 kb)
Let me know how it turns out!