Saturday, January 11, 2014

Using Google MAP control in Asp.Net

There are various Google MAP controls available that can be used with Asp.Net. Listed below are few of popular Google MAP controls available.

1) Subgurim google map
2) Artem google map
3) Reimers google map

 I have tried using all of the above controls but my exact retirement could not be achieved. My objective was to get the latitude  and longitude of the clicked location. The problem was I had two map controls on the same form and it seems if two map controls are used on the same form, click event of the second control does not get fired for some reason. I could not find the reason for this to occur and finally ended up using google API provided in w3shools which solved my problem.

cheers
Samitha


Thursday, December 19, 2013

Change Asp.net Ajax tab page header from javascipt

This is not as straightforward as you might have thought. To access the tab pages use get_tabs()[indexOfTab] as shown below.

$find('ctl00_cphMainContent_tc1').get_tabs()[0]) ; // tab 0
$find('ctl00_cphMainContent_tc1').get_tabs()[1]) ; // tab 1

To set the tab header use the _header of the tab
 $find('ctl00_cphMainContent_tc1').get_tabs()[0]._header.innerHTML='Tab 0';
 $find('ctl00_cphMainContent_tc1').get_tabs()[1]._header.innerHTML='Tab 1';

Cheers
Samitha

Saturday, December 7, 2013

asp.net 4.0 mobile development

With the release of asp.net 4.0 and MVC 3.0 there has been a major changes in the mobile development. Following whitepaper discusses in detail how you would develop mobile web pages with asp.net 4.0 and MVC 3.0 .

http://www.asp.net/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application

cheers
Samitha

Saturday, November 16, 2013

Checkboxlist checkbox items acess from javascript

If you want to iterate through Checkboxlist  check box items it not as straightforward as you might have thought.

The trick is to access the check box items rendered as labels as shown below

 var chkBoxList = document.getElementById('<%=chkList.ClientID%>');

                var checkboxes = chkBoxList .getElementsByTagName('input');

                for (var i = 0; i < checkboxes .length; i++) {
                    var checkItem = checkboxes [i];

                    var label = checkItem .parentNode.getElementsByTagName('label');
                     //checked item
                      if (checkItem .checked) {
                           ...
                        }
                       //access checkItem text
                        label[0].innerHTML='';
                    }

                }

cheers
Samitha

Saturday, October 19, 2013

Visual Studio 2013 Reased


Microsoft Announces offical release of  Visual Studio 2013 and offerd key features including

  • Better Productivity 
  • Windows 8.1 App Development
  • Debugging improvements and more...
 
More Info and downoload
http://www.microsoft.com/visualstudio/eng/visual-studio-2013#story-2013

cheers
Samitha

Friday, October 18, 2013

Normalize.css

This makes browsers render all elements more consistently and in line with modern standards.

Check out following link for more information

https://github.com/necolas/normalize.css/

cheers
Samitha