Archive

Archive for October, 2009

RT @PhotoLegal: Petition again…

October 30th, 2009 Comments off

RT @PhotoLegal: Petition against the Government’s smash and grab raid on photographer’s intellectual property http://bit.ly/1hZEhN

chilling before a mamouth phot…

October 27th, 2009 Comments off

chilling before a mamouth photo editing session laters :-)

Right that is 80 gig of my mus…

October 15th, 2009 Comments off

Right that is 80 gig of my music in one place, now I need to get iTunes running to sort them all out – ouch!

See, I knew banannas were impo…

October 15th, 2009 Comments off

See, I knew banannas were important http://bit.ly/3udwqx

Berners-Lee ‘sorry’ for slashe…

October 15th, 2009 Comments off

Berners-Lee ‘sorry’ for slashes in internet URL’s http://bit.ly/SJZno

Is Photoshop CS4 all its crack…

October 13th, 2009 Comments off

Is Photoshop CS4 all its cracked up to be? Why should I upgrade from CS3? Questions questions!!!!

Google Forces Web Standards Is…

October 8th, 2009 Comments off

Google Forces Web Standards Issue Using Sexy Buttons – http://bit.ly/p74cq

#Photolinks new artwork, #bank…

October 8th, 2009 Comments off

#Photolinks new artwork, #banksy it’s not but excellent it is anyway http://twitpic.com/kqmvs

Getting the control that posted back to asp.net application

October 7th, 2009 Comments off

Need to know which specific control posted back to your page? (Original article at http://geekswithblogs.net/mahesh/archive/2006/06/27/83264.aspx)

/// <summary>
 /// Tells us which control posted back
 /// </summary>
 /// <returns></returns>
 public Control getPostBackControlName()
 {
 Control control = null;
 //first we will check the "__EVENTTARGET" because if post back made by       the controls
 //which used "_doPostBack" function also available in Request.Form collection.
 string ctrlname = Page.Request.Params["__EVENTTARGET"];
 if (ctrlname != null && ctrlname != String.Empty)
 control = Page.FindControl(ctrlname);

 // if __EVENTTARGET is null, the control is a button type and we need to
 // iterate over the form collection to find it
 else
 {
 string ctrlStr = String.Empty;
 Control c = null;
 foreach (string ctl in Page.Request.Form)
 {
 //handle ImageButton they having an additional "quasi-property" in their Id which identifies
 //mouse x and y coordinates
 if (ctl.EndsWith(".x") || ctl.EndsWith(".y"))
 {
 ctrlStr = ctl.Substring(0, ctl.Length - 2);
 c = Page.FindControl(ctrlStr);
 }
 else
 c = Page.FindControl(ctl);

 if (c is System.Web.UI.WebControls.Button || c is System.Web.UI.WebControls.ImageButton)
 {
 control = c;
 break;
 }
 }
 }
 return control;
 }

If you are using master pages, simply add this to the master.cs file and where you need to call the method use the following code:

MasterPage masterPage = (MasterPage)Page.Master; // where MasterPage is the class name
 Control rep = masterPage.getPostBackControlName();
 if (rep.Parent.Parent.ID == "rpRegion")// only if postback is the regions control
 GetSelectedRegion();

30k email addresses compromise…

October 7th, 2009 Comments off

30k email addresses compromised – was it down to keyloggers? http://bit.ly/1wFJuQ