Insert:    
Visibility:     Module:   
 
Register Login
Home    February 4, 2012
Spring on the Gulf Coast Minimize
Displaying 1-8 of 54 items.
Pirates CoveRelics
SunkTipsy
The CoveNice View
Conference CallDSC_8308_9_tonemapped.jpg
 
Daphne News and Headlines Minimize
  
 
Foley News and Headlines Minimize
Fri, 03 Feb 2012 12:36:08 -0600

al.com (blog)

Go Red for Women: Foley woman shares story of near fatal heart attack
al.com (blog)
By Daniel Boyette, Press-Register Amanda Hebert, 52, of Foley survived open-heart surgery, internal bleeding and a collapsed lung last November. Three of her four heart arteries had significant blockage. (Press-Register/Daniel Boyette) FOLEY, ...

Fri, 03 Feb 2012 12:08:43 -0600

Press-Register - al.com (blog)

South Baldwin Regional Medical Center receives chest pain accreditation
Press-Register - al.com (blog)
By Daniel Boyette, Press-Register FOLEY, Alabama -- South Baldwin Regional Medical Center recently added to its heart and vascular care resume, being granted full chest pain accreditation from the Society of Chest Pain Centers.

Thu, 02 Feb 2012 18:05:05 -0600

Robertsdale High boys nip Foley High, 43-41, in 6A Area 3 basketball
The Huntsville Times - al.com
Quinton White (13) of Foley High draws a charge against Laprinston Agee (1) of Robertsdale High on Tuesday, Jan. 31, 2012. (Press-Register/Robert Ladnier) Josh Laird (22) of Robertsdale High scores against visiting Foley High on Tuesday, Jan. 31, 2012.

and more »
Tue, 31 Jan 2012 23:05:52 -0600

Daphne boys outlast Foley in OT to earn key 6A Area 3 victory
The Birmingham News - al.com
FOLEY, Alabama -- Daphne's boys basketball just made the 6A Area 3 race a little more interesting. The Trojans (8-13 overall, 3-2 in 6A Area 3) came alive at the end of the game with Foley, now 3-2 in the area race, on the road Friday evening to win ...

and more »
  
 
Gulf Shores News and Headlines Minimize
Thu, 02 Feb 2012 18:44:37 -0600

Press-Register - al.com (blog)

13 acts we'd love to see on the Hangout Music Festival 2012 lineup
Press-Register - al.com (blog)
By Matt Cuthbert, al.com Who will rock the 2012 Hangout Music Festival lineup? For now, we're just speculating like any other fan. (photo by Josh Rhinehart) GULF SHORES, Alabama -- Yesterday afternoon, the Hangout Music Festival teased on its Facebook ...

and more »
Wed, 01 Feb 2012 13:17:47 -0600

Press-Register - al.com (blog)

Snowbirds' Brat Fest brings in big money for local fire departments
Press-Register - al.com (blog)
By Press-Register Correspondent GULF SHORES, Alabama -- Since the first Brat Fest in 1998, snowbird clubs have raised more than $78000 for three Pleasure Island fire departments. "Back home in the Midwest, everyone sells brats to raise money and we ...

Wed, 01 Feb 2012 13:09:17 -0600

Gulf Coast Family Chiropractic is hosting educational events on Heart Health
Orange Beach
February 1, 2012 Gulf Shores, AL (GSA) – Feb. 13, 2011 Gulf Coast Family Chiropractic is hosting educational events on Heart Health throughout the month of February. Through our revolutionary advanced talk, Maximized Living will teach you about how ...

Wed, 01 Feb 2012 00:24:35 -0600

al.com

Gulf Shores Police Employee Arrested
WKRG-TV
A 13 year civilian employee in charge of the Gulf Shores Police evidence room has been arrested on theft and drug charges. (more) He worked for the Gulf Shores Police Department for 13 years. Now Barry Martin sits in a Baldwin County jail cell accused ...
Trusted police employee arrested in Gulf Shoresal.com (blog)

all 3 news articles »
  
 
Orange Beach News and Headlines Minimize
Thu, 02 Feb 2012 21:47:49 -0600

Press-Register - al.com (blog)

Judge orders hearing in former Orange Beach Mayor Steve Russo's bid to ...
Press-Register - al.com (blog)
By Brendan Kirby, Press-Register View full sizeFormer Orange Beach Mayor Steve Russo arrives at federal court in Mobile Friday, Feb. 23, 2007, for sentencing. His wife Crystal Russo is on his right. (Press-Register/Victor Calhoun) MOBILE, ...

Thu, 02 Feb 2012 14:06:13 -0600

Press-Register - al.com (blog)

Alabama mayors upset at BP decision to switch beach cleanup contractor
Press-Register - al.com (blog)
By Brendan Kirby, Press-Register View full sizeCrews clean Orange Beach, Alabama, on Saturday, June 12, 2010. BP PLC informed coastal Alabama mayors this week that they had decided to replace Theodore-based CrowderGulf with Danos and Curole Marin ...

Sat, 21 Jan 2012 18:30:02 -0600

Orange Beach krewe presents 'View from the Top'
Gulf Coast Newspapers
ORANGE BEACH, Ala. -- The Sirens of the Sea, a local ladies Mardi Gras krewe, will present their fifth annual “VIEW FROM THE TOP” on Saturday, Feb. 4 from 10 am-4 pm This yearly event provides local residents and winter guests an opportunity to tour ...

Fri, 20 Jan 2012 14:12:19 -0600

Press-Register - al.com (blog)

Plan for bridge over Gulf State Park draws environmental concerns
Press-Register - al.com (blog)
By Kathy Jumper, Press-Register ORANGE BEACH, Alabama -- The state says a planned elevated roadway over Gulf State Park would have minimal impact on the park, while environmentalists liken it to paving paradise. "We want to find the lowest-impact way ...

  
 
Robertsdale News and Headlines Minimize
Thu, 02 Feb 2012 18:05:05 -0600

Robertsdale High boys nip Foley High, 43-41, in 6A Area 3 basketball
The Huntsville Times - al.com
Quinton White (13) of Foley High draws a charge against Laprinston Agee (1) of Robertsdale High on Tuesday, Jan. 31, 2012. (Press-Register/Robert Ladnier) Josh Laird (22) of Robertsdale High scores against visiting Foley High on Tuesday, Jan. 31, 2012.

and more »
Thu, 02 Feb 2012 00:08:32 -0600

Press-Register - al.com

Felony Animal Abuse Charges Coming in Summerdale Case
WKRG-TV
Prosecutors will pursue felony charges for two Baldwin County women accused of abandoning 200 animals to starve to death. Meanwhile, the cats and dogs are doing well in their recovery. (more) Good news for more than 200 animals left abandoned and ...
Baldwin County authorities expect other charges, including felonies, in ...Press-Register - al.com (blog)
South Alabama veterinarians, shelters caring for animals found in Baldwin CountyThe Republic

all 17 news articles »
Wed, 01 Feb 2012 19:03:31 -0600

Helen M. Sasser Hooper
Atmore Advance
ROBERTSDALE – Helen M. Sasser Hooper passed away Saturday, Jan. 28, 2012. She was a native of Atmore and a resident of Robertsdale. She retired from Monsanto after 34 years of employment. She is survived by three sons, Charles E. Chavis, of Elberta, ...

Tue, 31 Jan 2012 18:11:07 -0600

Boys 6A Area 3 basketball race gets interesting
al.com
Demetrius McKinney (45) drives into the lane against host Fairhope High on Friday, Jan. 27, 2012. (Press-Register/Robert Ladnier) Rushing Watson of Fairhope High dishes a no-look pass in a 6A Area 3 contest against visiting Robertsdale High on Friday, ...

and more »
Sun, 29 Jan 2012 23:12:01 -0600

al.com

Rescued animals receive vet care
WALA-TV FOX10
BALDWIN COUNTY, Ala. (WALA) - The Baldwin County Humane Society (BARC!) tells FOX10 News they were asked by Summerdale Police Chief Eddie Ingram and by the City of Robertsdale Chief Investigator Rex Bishop to coordinate the rescue efforts January 26 at ...
Site of animal cruelty wasn't breeding operation, Humane Society saysal.com (blog)

all 7 news articles »
  
 
Recent Entries from Local Blogs Minimize
Jun 10

Written by: anomaly
6/10/2005 8:23 AM  RssIcon

In the July issue of MSDN Magazine, Dino Esposito provided an excellent article on allowing DHMTL in ASP.Net Controls.  This is a core concept for a project that I am working on,  so I thought I would share my particular solution to the problem.

First, the problem.   -- If you use DHTML and client-side scripting to manipulate server side objects, whatever attributes of those HTML elements that were changed since initial page render via DHTML will be lost on postback.   My particluar need for DHTML was related to allowing users to move controls around a webform (a form designer) and then saving the new X/Y coordinates of those controls for later use. 

Inspired from Mr. Esposito's article, I decided to model my solution using a single hidden field.   I wasn't excited about this approach but I did consider it to me a good alternative to the common approach of adding one hidden field per DHTML-manipulated server control.

Since my particular need was to capture X and Y coordinates of controls that have been moved around a webform, in the DHTML javascript events fired after the control is dropped into place, I added code to se custom attributes representing the current coordinates.   In this case dd.obj is whatever object was moved.

document.getElementById(dd.obj.name).setAttribute("x",dd.obj.x);
document.getElementById(dd.obj.name).setAttribute("y",dd.obj.y);

This code adds the custom attributes, X and Y to the DHTML layer that was dragged to a new location.   Now, I must be able to persist these custom attributes through the postback.

To the webform, or an external .js referenced by the webform, I added a javascript function to enumerate through all attributes for all divs and set a hidden field's value to a text string that we will be able to reverse engineer on postback to re-set those attributes. (Or, do whatever we would like)

function setAttribState(hiddenID){
 var attribState="";
 //Which HTML tags should we include in attribstate?
 //Div only for now.
 var tagnames = new Array();
 tagnames[0]='div';
 
 for(var h=0;h  var elem = document.getElementsByTagName(tagnames[h]);
  for(var i=0;i   var thisElement ="";
   var attribs = elem[i].attributes;
   var eleAttribs="";
   for(var j=0;j    if (attribs[j].specified){
     var thisAttrib = "";
     var thisAttrib = attribs[j].nodeName + ':' + attribs[j].nodeValue;
     eleAttribs += thisAttrib;
     if (j!=attribs.length-1){eleAttribs+=','};
     }
   }
   thisElement = elem[i].id + '/' + eleAttribs;
   attribState += thisElement;
   if(i!=elem.length-1){attribState+=';'};
  }
 }
 document.getElementById(hiddenID).setAttribute("value",attribState);
}
To the webform, add a hidden field called "__attribState".
Then, in the codebehind for the webform  I wired this javascript into the submit button's onclick event.
I did this by adding this to the page_load event: 
Button1.Attributes.Add("onclick", "setAttribState('__attribState')")
 In the same codehind, under the form click event, I added a call to iterate through the text and set the attributes.
 ReadAttribState("__attribState")

To the webform, I added the sub:

    Private Sub ReadAttribState(ByVal HiddenControlName As String)
        Dim hiddenctl As HtmlControls.HtmlInputHidden = CType(Page.FindControl(HiddenControlName), HtmlControls.HtmlInputHidden)
        Dim elements As String() = Split(hiddenctl.Value.ToString, ";")
        Dim element As String
        For h As Int32 = 0 To elements.GetUpperBound(0)
            Dim x, y As String
            Dim ctlId As String = Split(elements(h), "/")(0)
            Dim ctl As HtmlControls.HtmlGenericControl = Page.FindControl(ctlId)
            Dim attribs As String() = Split(Split(elements(h), "/")(1), ",")
            For i As Int32 = 0 To attribs.GetUpperBound(0)

                Dim attribName = Split(attribs(i), ":")(0)
                Dim attribValue = Split(attribs(i), ":")(1)
                If LCase(attribName) <> "id" Then
                    ctl.Attributes.Add(attribName, attribValue)
                End If
            Next
        Next
    End Sub

 Voilà.   When your DHTML event fires, it will set your custom properties.   Then, onClick, the form button will build a text string of all attributes for all divs and populate the hidden field.  On postback, your code will poll this field, parse the name/value pairs for each attribute and re-set those attributes on page render. In my implementation, I then use these custom attributes to set the style of my controls on page_load.

Until Next Time,

Bill Dodd
mcp, mcsd, mcad, mcdba

Tags:
Categories:
Location: Blogs Parent Separator DoddBlog

1 comment(s) so far...


Gravatar

Re: DHTML & ASP.Net Controls

ugg boots outle is possible to keep Franny boots clean using a damp rag. The best a part of the faux leather and nylon upper is that salt stains won't set in. That is often a problem for footwear made of organic fibers. You only acquire winter boots once ugg boots sale each number of years, so decide on a pair that can last coach purses outlet. Sporto boots are durable and provide comfort with fashion flair.
Men and women looking for distinctive footwear might consider a pair of boots within a bright or distinctive colour. There are many options to choose from, but cheap coach purses red boots are becoming popular. This stunning footwear can be the perfect addition to any wardrobe. It's important to seek out boots which can be trendy, functional, and comfy.
Should you be looking for hiking boots, this Italian ugg outlet is actually a very very ugg classic short sparkles good spot to start out. They is situated in Northern Italy in which the Alps usually are not far. They've manufactured it their mission to make shoes and boots particularly for ugg outlet store. Asolo hiking boots are top coach outlet store online rated good quality and undoubtedly worth searching into coach purse outlet.
Probably the most comfortable pair ugg bailey button triplet I've ever owned is really a pair of black ugg bailey button sale, leather over-the-knee Franco Sarto boots. They offer a massive selection of all types and Report Footwear makes super trendy cost-effective ugg bailey button boots if you're trying to find slouchy boots or perhaps a pair of trendy ugg boots clearance highs having a heel. Each could be found at retailers like Macy's, Nordstroms and ugg bailey button triplet sale online. In case you prefer on the web shopping, try ugg boots sale which provides totally free shipping ugg classic short sparkles each approaches.
The lining extends for the ankle so you're warm from ugg classic short top to bottom when uggs for cheap wearing these footwear. The accessible zipper up the front in the boots tends to make it easy to eliminate them and slip them back on, even when you're wearing many ugg boots clearance or probably carrying some added winter weight. A mix of faux leather and quilted nylon produces a pair of boots that could make it through harsh climate. ugg boots sale For those who've dealt with blizzards or snowstorms, you realize a shoe that may make it by means of this kind of situations is necessary.
The final design is a simple flat soled boot. Generally a basic design will probably be lined within. They cease just past the ankle, but could also go midway up the calf cheap uggs. Some have laces, whilst other uggs on sale people slip onto the foot. Basic boots are perfect for people who live in cold climates and are searching for a enjoyable addition to their footwear collection.

By DFSDF on   12/3/2011 12:32 AM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
 
Gulf Coast Photography: Bill Dodd on Flickr Minimize
Displaying 1-12 of 49 items.
Epcot: Japan [Explored]Golden Hour
Pier at the BayFort Morgan Fishing Pier
Seated Beneath Blue Cotton [Explored]Nature's Litter
The Gulf Shores SunsetFairhope Pier Sunset from Overlook
The Good LifeThe Boardwalk @ Johnson Beach and a small tale. :)
A Good Way to End the DayFairhope Pier at Sunset
 
 Happy Holidays!   Terms Of Use  Privacy Statement