Recent Posts

16
Comments

jQuery Store Locator with Google Maps API, Google Distance Matrix API, HTML5 GeoLocation & Google Maps KML file as data source by funky_rus

I haven't updated this blog for nearly 4 years, however, I thought I'd post this in case some web developer like myself out there is looking for a "client-side only" solution for a simple Store Locator. When I was looking for it, most of the examples...
42
Comments

GridView RowDataBound Alternating Row RowState issue by funky_rus

This was pissing me off for a good hour: RowDataBound event after you call edit on a row, I was checking for this row's state like this: e.Row.RowState == DataControlRowState .Edit this worked fine with rows No 1, 3, 5... (non-alternating rows), however...
6
Comments

A triangle in html by funky_rus

.ruslan { border: 0px solid transparent; } Guess how? No image involved, pure html!
Filed under: ,
2
Comments

your own custom event delegate by funky_rus

in MyControl: public delegate void MyEventHandler ( int value, string text); public event MyEventHandler MyEvent; protected void ddl_SelectedIndexChanged( object sender, EventArgs e) { MyEvent((( DropDownList )sender).SelectedIndex, (( DropDownList )sender...
Filed under: , , ,
1
Comments

string to enum by funky_rus

How do you convert a string into an enumeration? object Enum .Parse(System. Type enumType, string value, bool ignoreCase); example: enum Colour { Red, Green, Blue } Colour c = ( Colour ) Enum .Parse( typeof ( Colour ), "Red" , true ); Console .WriteLine...
0
Comments

When AJAX ScriptManager is on MasterPage by funky_rus

..and we need to access it: ScriptManager ScriptManager1 = ( ScriptManager )Master.FindControl( "ScriptManager1" ); ScriptManager1.AsyncPostBackTimeout = 300; ..or a much beter way: ScriptManager ScriptManager1 = ScriptManager .GetCurrent( this ); suggested...
0
Comments

JavaScript img preload by funky_rus

Not sure if this is the best method, but this is the one I used to preload the image. < script type ="text/javascript"> if (document.images) { imgPreload = new Image(); imgPreload.src = "../Images/ajax-loader.gif" ; } </ script >
827
Comments

Sort a ListBox by funky_rus

I believe this method is available in .NET 3.5, but in earlier framework versions we have to implement this ourselves.. #region Helper functions /// <summary> /// Sorts the list box in descending order /// </summary> /// <param name="pList...
1
Comments

CSV to TextReader by funky_rus

/// <summary> /// Take a file path and return a TextReader /// </summary> /// <param name="file_path"></param> /// <returns></returns> private TextReader OpenFile ( string file_path) { try { // Read the CSV file in...
5
Comments

AJAX UpdatePanel triggers, Conditional update mode by funky_rus

First of all I'd like to thank kowalskec for pointing me out the CopySourceasHTML VS add-in that will help me copy the code snippets from Visual Studio here without losing any text formatting. Cheers buddy! =) And now the task: The BugsGridView GridView...
More Posts Next page »