1st Boat Trip this year

clock June 18, 2008 17:54 by author Craig Hinkel

And it is about time.  Byron Scholle helped me install my steering cable in the Malibu Wakesetter VLX.  This was a royal PITA.   Fitting the 1 ft metal rod at the end of the cable through the gap below the steering column was nearly impossible.  The heater hose, ballast hose and electrical wires all ran through the same path which was about 2 in by 6 in. 

At the end of the day, we got the old one out, the new one in and the steering is smooth now.  I'm taking it out for a test run Friday.

Here is Carson on Byron's boat:

110_1097

110_1095

And here is a picture of him in the pool, I had to throw it in because of the quality.  Amy Merz took it and is becoming quite the photographer.

DSC_1321

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Click Once Button for ASP.Net 2.0

clock June 6, 2008 14:57 by author Craig Hinkel

I googled several ways to prevent double clicking in .Net2.0 with AJAX. 

I first tried using this snippet found all over the Internet:

   1: StringBuilder sb = new StringBuilder();
   2: sb.Append("if (typeof(Page_ClientValidate) == 'function') { ");
   3: sb.Append("if (Page_ClientValidate() == false) { return false; }} ");
   4: sb.Append("this.value = 'Please wait...';");
   5: sb.Append("this.disabled = true;");
   6: sb.Append(Page.ClientScript.GetPostBackEventReference(btnSave,"Test"));
   7: sb.Append(";");
   8: btnSave.Attributes.Add("onclick", sb.ToString());

This worked fine in IE, but generated two post backs in Firefox.

After more searching, I stumbled upon Sagi Shkedy's post: ClickOnce Button for ASP.Net 2.0

In the Page_Load event handler add this snippet:

   1: // Define the name and type of the client script on the page.
   2: string csname = "OnSubmitScript";
   3: Type cstype = this.GetType();
   4: // Get a ClientScriptManager reference from the Page class.
   5: ClientScriptManager cs = Page.ClientScript;
   6: // Check to see if the OnSubmit statement is already registered.
   7: if (!cs.IsOnSubmitStatementRegistered(cstype, csname))
   8: {
   9: string cstext = "if (typeof(ValidatorOnSubmit) == 'function' && ValidatorOnSubmit() == false)return false; else { var myCtl = document.getElementById('" + this.SubmitButton.ClientID + "'); myCtl.value = 'Please wait...'; myCtl.disabled = true;}";
  10: cs.RegisterOnSubmitStatement(cstype, csname, cstext);
  11: }

 

I tested this in IE 6, IE 7 and Firefox.  I'm using this within a DotNetNuke user control with AJAX enabled. 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


About the author

Something about the author

Page List

RecentComments

Comment RSS

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Sign in