RegisterStartupScript with asp:updatepanel

Using Asp.net if you want to add a script to the page from the code behind. The normal Page.RegisterStartupScript will not work if it is called from a button (or any other event) inside an updatePanel.

This is the normal code you would use ( this will work normally if you don’t have an updatePanel)

Page.RegisterStartupScript(“popup”, “<script type=’text/javascript’>alert(‘hello world’);</script>”);

It should be replaced with the following line of code

ScriptManager.RegisterStartupScript(PanelID, PanelID.GetType(), “script key”, “alert(‘hello world’);”, true);

or use it like this same result

ScriptManager.RegisterStartupScript(PanelID, PanelID.GetType(), “script key”, “<script type=’text/javascript’>alert(‘hello world’);</script>”, false);

Hope this was helpful and solved your problem

The Charted Cheese Wheel

The Charted Cheese Wheel

A Chart of 66 delightful cheeses from around the world, assembled into one wondrous wheel. The cheeses are broken down by the animal that produced the luscious milk, and then by the texture of the resultant cheese, forming a cornucopia of cheese that range from the mild to the stinky and from the rock hard to the silky smooth. The chart includes all-time faves like Cheddar, Brie, and Mozzarella as well as foodie faves like Stinking Bishop and Humboldt Fog.
Click here to View Full Photo

 

 

 

 

Print

Source: popchartlab

World No Tobacco Day

225px-Bluete_in_Aschenbecher[1]
Ash trays with fresh flowers are a common symbol of World No Tobacco Day
World No Tobacco Day is every year on the 31st of may, It is intended to encourage a 24-hour period of abstinence from all forms of tobacco consumption across the globe. The day is further intended to draw global attention to the widespread prevalence of tobacco use and to negative health effects, which currently lead to 5.4 million deaths worldwide annually. The member states of the World Health Organization (WHO) created World No Tobacco Day in 1987. In the past twenty years, the day has been met with both enthusiasm and resistance across the globe from governments, public health organizations, smokers, growers, and the tobacco industry.

 

 

Continue reading “World No Tobacco Day”

Earth Hour Satruday, March 23 2013 at 8:30 PM – 9:30PM

 Earth Hour is a worldwide event organized by the World Wide Fund for Nature (WWF) and held towards the end of March annually, encouraging households and businesses to turn off their non-essential lights for one hour to raise awareness about the need to take action on climate change. The event, conceived by WWF and Leo Burnett, first took place in 2007, when 2.2 million residents of Sydney participated by turning off all non-essential lights. Following Sydney’s lead, many other cities around the world adopted the event in 2008. Earth Hour 2013 will be held on March 23, 2013 from 8:30 p.m. to 9:30 p.m. during participants’ local time. Continue reading “Earth Hour Satruday, March 23 2013 at 8:30 PM – 9:30PM”

Asteroid 2012 DA14 passes very close to earth on Friday February 15,2013

Asteroid 2012 D14

2012 DA14 is a near-Earth asteroid with an estimated diameter of about 50 meters (160 ft) and an estimated mass of about 190,000 metric tons. It was discovered on February 23, 2012, by the OAM Observatory, La Sagra in Spain seven days after passing 0.0174 AU (2,600,000 km; 1,620,000 mi) from Earth on February 16. Calculations show that on February 15, 2013, the distance between the asteroid and the center-point of Earth will be 0.000228 AU (34,100 km; 21,200 mi). The asteroid will pass 27,700 km (17,200 mi) from the surface of Earth. The 2013 passage of 2012 DA14 by Earth is a record close approach for a known object of this size. Continue reading “Asteroid 2012 DA14 passes very close to earth on Friday February 15,2013”

How to take a screenshot on your phone

Are you wondering how to take a screenshot of your phone’s screen, we gathered a list of the most used phones

We would like to mention that on old phones taking screenshots was not a straight forward thing to do. for example the early versions of android a root was needed  or a special software, in windows 7.5 you need a software to do so.

Phones are sorted alphabetically

  • Galaxy Ace 1: Home Button + Power Button
  • Galaxy Ace 2: Home Button + Power Button
  • Galaxy Gio: Back button + Home Button
  • Galaxy Nexus: Power Button + Volume down
  • Galaxy Note 2: Power button + volume down / Slider the palm of your hand from right to left on the screen / Click on the pen button and touch  with it the screen for 2 seconds
  • Galaxy S 2: Power button + Home Button
  • Galaxy S 3: Power button + volume down / Slider the palm of your hand from right to left on the screen
  • Google Nexus S: Power Button + Volume down
  • HTC Butterfly:Home Button + Power Button/ Power button + Volume Down
  • HTC droid DNA: Home Button + Power Button/ Power button + Volume Down
  • HTC One S:Home Button + Power Button/ Power button + Volume Down
  • HTC One X :Home Button + Power Button/ Power button + Volume Down
  • iPads: Home Button + Power Button
  • iPhones 5 / 4s / 4 / 3G: Home Button + Power Button
  • LG Optimus 2X: Home Button + Power Button
  • LG Optimus: Home Button + Power Button
  • LG Spectrum: Home Button + Power Button
  • LG Nexus 4: Power button + Volume Down
  • Motorola Electrify 2: Power button + Volume Down
  • Motorola Xoom: Power button + Volume Down
  • Motorola DROID 4: Power button + Volume Down
  • Motorola DROID RAZR MAXX: Power button + Volume Down
  • Motorola DROID RAZR: Power button + Volume Down
  • Motorola DROID XYBOARD 10.1: Power button + Volume Down
  • Sony Ericsson xperia mini: power button + volume down
  • Windows Phone 8: Start and Power buttons

Hopes this list helped you find what you are looking for. if you know of any other way or any other phone not mentioned please drop us a comment.

If you like this article, remember it’s logical to share.