tag:blogger.com,1999:blog-242612652024-03-08T06:54:05.881-08:00Namespace Denny .NETI'm Denny .NET and this is my playground!Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.comBlogger77125tag:blogger.com,1999:blog-24261265.post-62175977112289897592007-04-24T15:30:00.000-07:002007-04-24T15:31:38.068-07:00New Blog AddressAlrighty, plain and simple: <strong>New blog address</strong>!<br /><br />Update your links and bookmark the new feed.<br /><br /><a href="http://www.dennydotnet.com/">http://www.dennydotnet.com/</a><br /><br />Old posts will remain here until I can import them to the new blog.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.comtag:blogger.com,1999:blog-24261265.post-7125022955618613702007-04-13T13:38:00.000-07:002007-04-13T13:46:54.964-07:00SubSonic 2.0 Beta 3SubSonic 2.0 Beta 3 is available for download: <a href="http://www.codeplex.com/actionpack/Release/ProjectReleases.aspx?ReleaseId=1387">http://www.codeplex.com/actionpack/Release/ProjectReleases.aspx?ReleaseId=1387</a><br /><br />Not a ton of info but you can see what was fixed. Keep yourself updated here, since CodePlex "seems to have an issue with updating RSS feeds in a timely fashion.": <a href="http://monk.thelonio.us/category/1.aspx">http://monk.thelonio.us/category/1.aspx</a>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-70538803518386920672007-03-21T13:38:00.000-07:002007-03-21T13:39:38.112-07:00JavaScript: Adding/Removing Elements from thin airJavaScript<br /><br />Some of the key items we'll be going over:<br /><br />1. How to create an element from thin air.<br />2. How to remove an element that we created from thin air.<br />3. How to set properties of an element created from thin air.<br />4. How to create a toggle feature for our element.<br />5. How to toggle only one element at a time.<br /><br />Ok first off, why did I need this? I'm using a DataList to display item information. Each line is one item and contains a few action buttons. These action buttons pop up new windows and allow you to configure whatever it is you need. Anywho, it was decided that there should be no pop-ups and that the information should appear below the row. In an effort to reduce code the information below the row would be in an IFRAME so we could just point to the URL of the old pop-up window. I didn't want to throw in an IFRAME with each row so I decided to use JavaScript to create the IFRAME on the fly.<br /><br />So first we need to know how to create an element from thin air. No problem,<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>var s2div = document.createElement('div');<br />s2div.setAttribute('id', 's2info');<br /></code></pre><br /><br />Tada! All good to go. We have a DIV element with an id of s2info. But where is it? Well it's not displayed yet because we need to let it know who its parent is. Luckily within each row is a DIV element which contains all the information. This is going to be our parent element. Let's add our newly created DIV to our content DIV and give it some style.<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>s2div.height = '300px';<br />s2div.width = '90%';<br />s2div.style.backgroundColor = 'red';<br />s2div.style.display = 'inline';<br />s2div.innerHTML = '<iframe src="http://www.example.com" width="100%"></iframe>';<br /><br />var par = document.getElementById('parentDiv');<br />par.appendChild(s2div);<br /></code></pre><br /><br />Great now our new DIV appears and it contains our IFRAME pointing to our example.com. Since this code needs to be called from our button clicks lets throw it in a function and then each button can just call it directly.<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>function showWin(el) {<br /> // Create our DIV container<br /> var s2div = document.createElement('div');<br /> s2div.setAttribute('id', 's2info');<br /> s2div.height = '300px';<br /> s2div.width = '90%';<br /> s2div.style.backgroundColor = 'red';<br /> s2div.style.display = 'inline';<br /> s2div.innerHTML = '<iframe src="http://www.example.com" width="100%"></iframe>';<br /> el.parentNode.appendChild(s2div);<br /> return false;<br />}<br /></code></pre><br /><br />Note that el is passed from the calling button. Also note that we append the new DIV with el.parentNode.appendChild(...). This is because we pass the button as el and its parentNode is the DIV we want to append to. So we're basically just pointing to the DIV but getting there through the button. Here is our button:<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code><input type="button" onclick="showWin(this);" id="iRox0rzB0xorz" value="Display" /><br /></code></pre><br /><br />So now every time we click the button we append a new DIV with the iframe on the same row. Gravy right? Well what if we keep clicking the button? We're going to keep appending a new DIV! Well we only want one DIV visible per button click. If another button is clicked we want to close the currently open DIV (if one is open) and then open the one we clicked.<br /><br />We'll need to set a global variable to keep an eye on which one is open. Here's the whole package:<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code><script language="javascript" type="text/javascript"><br />var old = '';<br /> function showWin(el) {<br /> var s = document.getElementById('s2info');<br /> if (s) {<br /> if (old != '') old.removeChild(s);<br /> if (old == el.parentNode) {old=''; return false;}<br /> }<br /><br /> // Create our DIV container<br /> var s2div = document.createElement('div');<br /> s2div.setAttribute('id', 's2info');<br /> s2div.height = '300px';<br /> s2div.width = '90%';<br /> s2div.style.backgroundColor = 'red';<br /> s2div.style.display = 'inline';<br /> s2div.innerHTML = '<iframe src="http://www.example.com" width="100%"></iframe>';<br /> el.parentNode.appendChild(s2div);<br /> old = el.parentNode;<br /><br /> return false;<br /> }<br /></script><br /></code></pre><br /><br />You can see our old variable keeps track of which element is showing the DIV. We also check to make sure a new button was clicked. If the same button was clicked twice we just remove the element but do not continue to add the new element.<br /><br />And there you go. Cross-browser compatible? Not sure.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com2tag:blogger.com,1999:blog-24261265.post-16941871414043934722007-03-07T14:57:00.000-08:002007-03-07T15:05:20.715-08:00Integrating Google MapsGoogle Maps + Your web app = Simple<br /><br />Working on a feature for my project and wanted to share how easily you can get Long + Lat using the Google Maps API.<br /><br />First we need to get the presentation down. We'll be creating a popup div where you can type an address and a button that displays the location on the Google Map.<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code> <div id="selectgeo" runat="server" style="background-color: GreenYellow; border: solid 1px darkgreen;<br /> position: absolute; left: 10px; top: 5px;"><br /> Address:<br /> <input id="txtAddr" type="text" /><br /> <input id="btnfindgeo" type="button" value="Go" onclick="showAddress(document.getElementById('txtAddr').value); return false;" /><br /> <input id="btndonegeo" type="button" value="Done" onclick="document.getElementById('selectgeo').style.display='none';" /><br /> <div id="mappp" style="width: 270px; height: 175px"><br /> </div><br /> </div><br /><br /><script src="http://maps.google.com/maps?file=api&v=2&key=yourkey"<br /> type="text/javascript"></script><br /></code></pre><br /><br /><strong>REMEMBER </strong>to replace "yourkey" with your Google Maps API key. <a href="http://www.google.com/apis/maps/signup.html">Get one here</a>.<br /><br />So we've got our Div: selectgeo, our Address box: txtAddr, our Button to find the location: btnfindgeo, our Done button: btndonegeo and finally our div which contains the map: mappp.<br /><br />You can see btnfindgeo is wired up with a javascript function: showAddress. This is where the goods come from :) Onto the JavaScript!<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>var map;<br />var geocoder = new GClientGeocoder();<br /><br />function loadGMap() {<br /> if (GBrowserIsCompatible()) {<br /> map = new GMap2(document.getElementById("mappp"));<br /> map.addControl(new GSmallZoomControl());<br /> map.addControl(new GMapTypeControl());<br /> map.setCenter(new GLatLng(37.4019, -122.1419), 13);<br /> }<br />}<br /><br />function showAddress(address) {<br /> geocoder.getLatLng(address,<br /> function(point) {<br /> if (!point) {<br /> alert(address + " not found");<br /> } else {<br /> map.setCenter(point, 13);<br /> var marker = new GMarker(point);<br /> map.addOverlay(marker);<br /> alert('['+ point.x + ', ' + point.y +']');<br /> }<br /> }<br /> );<br />}<br /><br />// Programatically load the map after onload.<br />var abo = document.getElementsByTagName("body");<br />if (abo != null) {<br /> abo[0].onunload = GUnload;<br /> abo[0].onload = loadGMap;<br />}<br /></code></pre><br /><br />And you're done! Type in your address and see what happens.<br /><br />Also the <a href="http://www.google.com/apis/maps/documentation/">Google Maps API Documentation</a> provides a TON of useful examples.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com3tag:blogger.com,1999:blog-24261265.post-30644259544914250952007-02-08T09:24:00.000-08:002007-02-08T09:47:49.139-08:00HowTo: Strongly Typed View with SubSonicI had a little trouble yesterday trying to get a Strongly Typed view working correctly in SubSonic. I spent a good 2 hours beating my brain trying to figure it out (I don't have internet at home yet - no Googling). Well after an hour break I came back and it hit me. It's very easy to implement, so lets start.<br /><br />First off SubSonic will create your view as a collection. If your view is named <strong>v_RecentShares</strong> then you'll get a <strong>VRecentSharesCollection</strong> object.<br /><br />You can then use that to query your view and iterate with a Strongly Typed reference:<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>Dim V as VRecentSharesCollection() = new VRecentSharesCollection().Load()<br />Dim Row as VRecentShares()<br /> <br />For Each Row in V<br /> Dim ShareName as String = Row.ShareName<br />Next<br /></code></pre>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-23142424751913229382007-02-05T15:23:00.000-08:002007-02-05T15:34:06.354-08:00Book Review: 175 Ways to Get More Done in Less Time!I just read through this book and it has some great tips. Straight and to the point, no models, history, deep discussions, etc... Just straight to the point, trivial tips that you can start using literally right now. If you're looking to get a few extra ideas on how to squeeze more time out of your day then this is a handy start.<br /><br />I've got a few tips bookmarked. This isn't a one-time read, as a matter of fact I'll be going back and bookmarking a few more tips suggested in this book. This book even sprung another idea on me for my website.<br /><br />The book is only 36 pages long and you can read through it, front to back, in no more than 15 minutes. You'll want a highlighter around to underline the tips that can help you. Most will help, some you already do, but you'll certainly pick up some new ideas.<br /><br /><blockquote>175 Ways to Get More Done in Less Time! <br />by David Cottrell and Mark C. Layton <br />CornerStone Leadership Institute © 2004 (36 pages) <br />ISBN:0965878848</blockquote>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-44392771477709354522007-01-31T14:47:00.000-08:002007-01-31T15:04:15.968-08:00Reading value of a CheckBox in DataGridWant to know how to get the value of a check box in a Template Field inside a DataGrid? Check it out:<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code> Dim chkMiss As CheckBox<br /><br /> ' Go through each row and find a check box<br /> For Each i As DataGridItem In dgActive.Items<br /> chkMiss = CType(i.FindControl("chkMiss"), CheckBox)<br /><br /> ' Check if miss was selected<br /> If chkMiss.Checked Then<br /> ' Use my checkbox <br /> End If<br /> Next<br /></code></pre><br />That's all you need on the server-side code, and now for the HTML... Inside your datagrid just create a template column and it should look something like:<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code> <asp:TemplateColumn HeaderText="Select Check Box"><br /> <ItemTemplate><br /> <asp:CheckBox id="chkMiss" Text='SomeText' runat="server"><br /> </asp:CheckBox><br /> </ItemTemplate><br /> </asp:TemplateColumn><br /></code></pre><br />And you're done! The same method applies to all other controls as well.<br /><br /><a href="http://www.dotnetkicks.com/kick/?url=http://dennylove.blogspot.com/2007/01/reading-value-of-checkbox-in-datagrid.html"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://dennylove.blogspot.com/2007/01/reading-value-of-checkbox-in-datagrid.html" border="0" alt="kick it on DotNetKicks.com" /></a>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-7632936334349737642007-01-20T19:04:00.000-08:002007-01-25T15:20:47.423-08:00Sys is undefined - AJAX 1.0 RCOkay, I am frustrated. My project was working fine a few days ago and now I'm getting the dreaded <strong>Sys is undefined</strong> error. I've been trying to track it down with no luck.<br /><br />A Google search shows that there are many people with this same issue. I've gone through my config file and everything looks correct.<br /><br />I'll keep working on it and will post here as soon as anything comes up.<br /><br /><br /><strong>Update: A little farther...</strong><br /><br />Ok it seems as if my ScriptResource.axd file is being encoded! I'm using the <a href="http://www.blowery.org/code/HttpCompressionModule.html">Blowery HTTP Compression Module</a> and after adding an exclusion for the mime type: application/x-javascript my WebResource.axd started coming back - it was coming up with a blank file before. However I keep getting the error <strong>Invalid character</strong>. I think its because ScriptResource.axd is encoded and not being decoded!<br /><br />It's also telling me that the Type.RegisterNamespace function cannot be found (this function exists in ScriptResource.axd). I checked with Fiddler and ScriptResource.axd is being GZIP encoded. So I removed any reference to blowery and still no luck! You can view my posts on the ASP.NET Forum <a href="http://forums.asp.net/2/1500402/ShowThread.aspx">here</a> for further detail, my user name is SuperGhost (the Batman logo).<br /><br />You can check if your script is being encoded by opening up Fiddler and calling your ScriptResource.axd. Run your page first and get the source. The source will contain the correct path and querystring to the ScriptResource.axd file as well as the WebResource.axd file.<br /><br />I'll post an update when this gets resolved!<br /><br /><br /><strong>Resolved: Finally</strong><br /><br />Ok found the problem a few days ago. The file was being encoded and the problem was that I had earlier uncommented a line in my web.config and then commented it back out again. Apparently the setting remained, not sure why. This is the line:<br /><br /><scriptresourcehandler enablecompression="true" enablecaching="true"><br /><br />You can see the enableCompression is set to true. So a simple change was all it needed. I uncommented the line and set compression to false:<br /><br /><scriptresourcehandler enablecompression="false" enablecaching="true"><br /><br />And that's it! Resolved! Also the Blowery HTTP Module was not affecting the script at all. I hope this helps anyone else having this issue!Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com12tag:blogger.com,1999:blog-24261265.post-32895185298461247582007-01-16T10:09:00.000-08:002007-01-20T18:56:10.261-08:00Blocking DoS attacks, maybe...Mads / .NET Slave has posted an HttpModule for <a href="http://www.madskristensen.dk/blog/Block+DoS+Attacks+Easily+In+ASPNET.aspx">blocking DoS attacks</a>. How does it work? Well any IP address that accesses your page more than 10 times per second gets banned for 5 minutes. All settings are configurable, for example you could ban on 15 requests per 2 seconds for 10 minutes.<br /><br />I would certainly recommend that you do some testing to find a decent setting. Also some comments have come up on Mads' post wondering about more detail like: What if you're being hit by AOL's proxy server or a search engine bot? You'll have to take into account how your visitors access your website too. I will be playing around with the source and seeing how it reacts to an AJAX-enabled site as well.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-53154778459444071902007-01-12T13:51:00.000-08:002007-01-20T18:58:31.306-08:00A Better IIF for VB.NETAfter browsing around a while I came across a code snippet that is very useful yet hardly used! I've always been jealous of C#'s easy-to-use ? operator: <blockquote>if x ? a : b</blockquote> But I didn't mind using <strong>IIF</strong> for VB.NET. Anyways, apparently IIF does some nasty typecasting in the background and isn't very <strong>Option Strict On</strong> friendly. Say hello to the new and improved Generic IIF function:<br /><blockquote>Public Function IIf(Of T)(ByVal expression As Boolean, _<br /> ByVal truePart As T, ByVal falsePart As T) As T<br /><br /> If expression Then<br /> Return truePart<br /> Else<br /> Return falsePart<br /> End If<br />End Function</blockquote>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com2tag:blogger.com,1999:blog-24261265.post-69342019533459176122007-01-11T07:29:00.000-08:002007-01-11T07:44:10.089-08:00Followup: SubSonic in WinForms or DLLLooks like the feature to use <a href="http://actionpack.wekeroad.com/forums/thread/1290.aspx">SubSonic in WinForms and DLL's</a> will be added to the next SubSonic release!<br /><br />Also there's a <a href="http://www.devinstinct.com/Eng/code.htm">new version</a> of the tool that works with the SubSonic 1.0.6 release. It also now works with Enterprise Library projects as well. Thanks DevInstinct / Martin!Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-77765382429575886862007-01-03T07:59:00.000-08:002007-01-03T08:36:33.109-08:00SubSonic in WinForms or DLL<a href="http://www.healthy-weight-loss-revealed.com/wp-content/themes/modifiedLetterhead/images/food-scale.jpg"><img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 15%; CURSOR: hand; HEIGHT: 15%" alt="" src="http://www.healthy-weight-loss-revealed.com/wp-content/themes/modifiedLetterhead/images/food-scale.jpg" border="0" /></a>I was recently trying to get SubSonic integrated into my Business Layer DLL, which compiled with my web project, and found a great tool in the <a href="http://actionpack.wekeroad.com/default.aspx">SubSonic </a><a href="http://actionpack.wekeroad.com/default.aspx">forums</a>. It was a bit of a nuisance to manually do this after each release but thanks to DevInstinct in the forum who has created a Custom Tool add-in for VS 2005 to allow you to use SubSonic in a DLL or EXE (You can use it in Web Application Projects and WinForms too). <br /><br />This is great because now I can properly separate my Presentation Layer with my Business Layer and package SubSonic in only the Business Layer project! Scale away! This tool is great so go <a href="http://www.devinstinct.com/Eng/code.htm">check it out</a> and show <a href="http://actionpack.wekeroad.com/forums/thread/1290.aspx">support for it</a> so we can get it added to a future SubSonic release.<br /><br /><br />P.S. I don't pay too much attention to punctuation or properly formatted paragraphs, enjoy ;-) oh and Happy New Year!Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-82126441056240227702006-12-28T16:49:00.000-08:002006-12-28T16:52:37.112-08:00SubSonic 1.0.6 ReleasedMerry Christmas... <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=actionpack"><strong>SubSonic 1.0.6</strong></a> was released on Tuesday.<br /><br />No change log yet but we'll just have to wait and see.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-10289306733240844082006-12-21T09:02:00.000-08:002006-12-21T09:07:27.077-08:00Taking your ASP.NET app offlineSomething really interesting and useful for ASP.NET is the ability to take your application completely offline. As a matter of fact when you publish your website Visual Studio 2005 takes your application offline. So even if you go to mysite.com/here/there.aspx you will still get an "application offline" message. The best part is that you can customize the message.<br /><br />All you have to do is upload a "app_offline.htm" file to your website. Thats it! You can create your own custom message in the htm file. There's no special tags to use, the file itself lets .NET know you want your app offline. Just remember to take it off ;)<br /><br />If you want more details, including an example file, check out the 15 Seconds article: <a href="http://www.15seconds.com/issue/061207.htm">Taking an ASP.NET 2.0 Application Offline</a>.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-15171576154920807372006-12-04T08:12:00.000-08:002006-12-04T08:41:06.062-08:00ASP.NET AJAX under the hoodGreat article by Omar Al Zabir on some advanced tips & tricks using AJAX. Omar is the architect behind Pageflakes.com and uses ASP.NET / AJAX as the foundation. If you're using AJAX, much like I am, you will find the article very useful. It goes into batch calls, timeouts, caching, javascript tricks, and a few other items.<br /><br />One thing I found very useful was how Omar implemented a "retry" feature when doing an AJAX call. This is exactly (or very close to) what I have implemented in my <a href="http://www.stickto.us">StickTo</a> application. So go on and <a href="http://www.codeproject.com/Ajax/aspnetajaxtips.asp">take a look</a>. And in the near future I'll be posting some AJAX tips of my own including: displaying a progress bar without an update panel and how to use JSON de/serialization from client/server and back.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-1090082293139770782006-11-29T07:46:00.000-08:002006-12-04T08:42:25.300-08:00SubSonic - Sweet!<a href="http://www.arachnoid.com/alaska2005/f-18-subsonic-lenticular_small.jpg"><img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 140px; CURSOR: hand" height="119" alt="" src="http://www.arachnoid.com/alaska2005/f-18-subsonic-lenticular_small.jpg" border="0" /></a>I've been using SubSonic: The Zero Code DAL (formerly known as actionpack) for about two months now and I LOVE IT! SubSonic is a tool that helps a website build itself. Remember how long it took to write your SQL Data Access Layer? Well SubSonic takes care of all of that for you in a real-time ORM Mapping manner and even incorporates Views and Stored Procedures too!<br /><br />My favorite part of SubSonic is that since I've started using it I haven't had to write ANY Data Access Layer functions at all. SubSonic takes care of everything. I can get a DataSet in my business layer by simply calling something like:<br /><br /><blockquote>Public Function QueryAllProducts() as DataSet<br />Return New Query(Tables.Products).ExecuteDataSet()<br />End Function</blockquote><br />That's it!! Also looking at the code you can see: <strong>Tables.Products</strong>... Yes, everything is Strongly-Typed too, even the Stored Procedures! The project is still under development but it's certainly a strong build, a few applications have already been built using SubSonic. So certainly join the community and give SubSonic a try.<br /><br /><br /><br />Check out the 20 minute demo webcast: <a href="http://www.wekeroad.com/actionpackintro.html">http://www.wekeroad.com/actionpackintro.html</a>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-12547087327854895982006-11-13T07:55:00.000-08:002006-12-04T08:42:53.012-08:00ATLAS: POST is slower than GETA good article explaining that ATLAS defaults to POST when calling back and that POST is generally slower than calling a GET. However GET only supports strings, dates and numerals. The article goes on and shows how to implement a GET statement from your web service.<br /><br />Very handy if you're looking to increase performance on your AJAX.NET app, if applicable of course :)Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-54372533908914491702006-11-02T14:20:00.000-08:002007-01-20T18:57:13.270-08:00Choosing Between VB.NET and C#<a href="http://bluebison.net/sketchbook/0406/dog_pancake_small.jpg"><img style="FLOAT: left; MARGIN: 10px 10px 0px 0px; WIDTH: 120px; CURSOR: hand; HEIGHT: 170px" height="196" alt="" src="http://bluebison.net/sketchbook/0406/dog_pancake_small.jpg" border="0" /></a><br /><div>Good article on choosing between the two languages. A lot of people look at VB.NET differently because of the older VB6. However VB.NET is just as powerful as C#, minus the ability to break out of managed code - which in a lot of cases is not recommended. Anyways, take a look at the article you'll find VB.NET is just like C# ~ And my personal opinion reflects this too. I can write C# just as well as I can VB.NET.</div><br /><div></div><br /><div><a href="http://dnjonline.com/article.aspx?ID=mar05_vbvscsharp">http://dnjonline.com/article.aspx?ID=mar05_vbvscsharp</a></div>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-42068505721927189582006-11-01T15:19:00.000-08:002006-12-04T08:43:43.236-08:00Debug Javascript in Visual Studio 2005<a href="http://home.earthlink.net/~shadowgate/images/trashcat.jpg"><img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 200px; CURSOR: hand" alt="" src="http://home.earthlink.net/~shadowgate/images/trashcat.jpg" border="0" /></a><br /><div>I haven't posted in a while but came across something worthy and helpful! It's an article on how to debug javascript with VS2005! This is definitely going to come in handy. Just finished one of my other sites and can now move on to the project I've been excited about!! Debugging javascript will be intense so this came just in time.<br /><br /><a href="http://weblogs.asp.net/pglavich/archive/2006/11/02/Debugging-Javascript-on-a-Live-site-_2D00_-Fun-and-Games.aspx">Debug JS with VS2005</a></div><br /><div></div><br /><div>P.S. I needed to add some images, it was just too "texty" here.</div>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-24245681317760434532006-10-18T12:34:00.000-07:002006-10-18T21:28:51.103-07:00Computer Geek!For those of you not yet aware, Internet Explorer 7 is now available for download (the actual release not the beta). <a href="http://www.microsoft.com/ie">Get it here</a>.<br /><br />I just realized how much of a computer geek I am!! I just received an email from one of my co-workers and she said we have Visual Studio 2005 and the MSDN Library ready and waiting for us to install, unfortunately only after a version release, which isn't until the middle of November. I'm excited and can't wait to click the <strong>install</strong> button! Why!? *sigh* I'm the only one in my group who's excited... <br /><br />Something worthy for you from Steve Wozniak (Apple co-founder)...<br /><br /><blockquote>My advice has to do with what you do when you find yourself sitting there with ideas in your head and a desire to build them. But you're young. You have no money. Those ideas are what drive you, they're all you think about. But there's a big difference between just thinking about inventing something and doing it. So how do you do it? How do you actually set about changing the world?<br /><br />· Believe in yourself. Don't waver.<br /><br />· A revolutionary new product won't be understandable to most people. Don't let these people bring you down. They only know what they're exposed to. It's a type of prejudice against the spirit of invention. Trust your intuition, that way lies happiness.<br /><br />· See things in "grey scale".<br /><br />· Don't follow the crowd. Do a factual study. Don't waste time supporting a bad idea. Keep your ego out of the equation.<br /><br />· Work alone.<br /><br />· Don't work in a corporate environment where products are designed by committee.<br /><br />-- STEVE WOZNIAK</blockquote>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-49632877350715893012006-10-12T08:42:00.000-07:002006-10-19T06:35:29.598-07:00Attributes.Add LamenessHad some trouble today with *.Attributes.Add and using an ampersand &.<br /><br />The problem is Attributes.Add and here's what I found:<br /><blockquote>Using Reflector to trace through <strong>System.Web.UI.WebControlsWebControl.Attributes</strong> to see if it was doing any kind of encoding turns out that<br /><strong>System.Web.HttpUtility.HtmlAttributeEncode</strong> is called on any text added via <em>Attributes.Add</em>. HtmlAttributeEncode turns & into <xmp>&</xmp> and turns double quotes (") into <xmp>"</xmp></blockquote>Lameness I say! Anyways the solution I used was to register a startup script and place my onClick in a function then on my attributes.add I just call the javascript function. Works well, and note that this happened to me on ASP.NET 1.1, not sure if it occurs in 2.0<br /><br /><a href="http://www.dotnetkicks.com/kick/?url=http://dennylove.blogspot.com/2006/10/attributesadd-lameness.html"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://dennylove.blogspot.com/2006/10/attributesadd-lameness.html" border="0" alt="kick it on DotNetKicks.com" /></a>Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-16487741620923386852006-10-11T09:45:00.000-07:002007-01-20T18:59:33.386-08:00Quick Book ReviewJust finished reading:<br /><br /><ul><li><strong>Cascading Style Sheets 2.0 Programmer's Reference</strong><br /><em>by Eric A. Meyer</em><br /><span style="font-size:78%;">McGraw-Hill/Osborne © 2001 (334 pages) : ISBN:0072131780</span></li></ul><br /><a href="http://isbn.abebooks.com/mz/md/80/07/md0072131780.jpg"><img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 75px; CURSOR: hand" alt="" src="http://isbn.abebooks.com/mz/md/80/07/md0072131780.jpg" border="0" /></a>If you know <a href="http://meyerweb.com/eric/css/">Eric Meyer</a> then you know he's a well known CSS professional. His book is undoubtedly good, even research Amazon.com to see the user reviews.<br /><br />I was looking for an intermediate introduction to CSS. I have a general knowledge of CSS and use it quite often when designing websites. Recently I heard all about CSS layouts and that they are the way to go. Since I was not too familiar with using CSS for layouts, or the extent and benefits of CSS, I decided to pick up this book. Glad I did because Eric goes over everything you'll need to know and then some. Be forewarned though that beginners who have never touched CSS before may find it hard to catch on, this is certainly an intermediate to expert reference book. I'll be keeping this book close knowing I will be using it for reference quite often. Remember to check his website for great examples.Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com0tag:blogger.com,1999:blog-24261265.post-19637658570861986922006-10-08T14:39:00.000-07:002006-10-08T14:48:06.885-07:002007 Camaro<a href="http://photos1.blogger.com/blogger2/4753/2961/1600/2007Camaro.jpg"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger2/4753/2961/200/2007Camaro.jpg" border="0" alt="" /></a><br />Yes this is not programming related but my love for the '69 Camaro SS has been rekindled! I just got a glimpse of this on accident and I am drooling!! GM is planning on bringingback the amazingly sexy (IMO) Camaro with the 67-69 body style. I can certainly say, God-willing, this will be my next car. (Assuming they stick to anything remotely close to the concepts pictured here)<br /><a href="http://photos1.blogger.com/blogger2/4753/2961/1600/2007camaroz28.sized.jpg"><img style="float:left; margin:0 10px 10px 10px;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger2/4753/2961/200/2007camaroz28.sized.jpg" border="0" alt="" /></a>I've wanted a 69 SS for a while now but seeing these new beauty's really makes me want them. There's nothing better than a new oldie. And this one certainly gets my heart pumping! Cant wait to see the real thing!Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-46955199123771301842006-10-03T23:20:00.001-07:002007-01-31T15:11:13.922-08:00Project FoundationOk, it's late... I've had a stressful day... and I'd like to try the new Blogger Beta posting... so here goes.<br /><br />I've finalized my foundation for my new project. After many hours researching and learning about some of this stuff I have chosen a very sexy set of tools and components as my new foundation. Here it is:<br /><br /><ul><br /><li>Visual Studio 2005 / ASP.NET 2.0 / VB.NET</li><br /><li><a href="http://www.asp.net">ASP.NET AJAX</a></li><br /><li><a href="http://wiki.script.aculo.us/scriptaculous/show/Prototype">Prototype</a></li><br /><li><a href="http://script.aculo.us">Script.aculo.us</a></li><br /><li><a href="http://curvycorners.net/">Curvy Corners</a> - Snicker all you want the curves are sexy ;)</li><br /><li>And I've been looking at <a href="http://www.ormapper.net/">Wilson ORMapper</a> or <a href="http://www.hibernate.org/343.html">NHibernate</a> - not sure yet<br /></ul><br /><br />There ya go! If anyone has any suggestions or comments please let me know!Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com1tag:blogger.com,1999:blog-24261265.post-1159908377567004322006-10-03T13:20:00.000-07:002006-10-03T13:46:17.763-07:00New Visual Basic KeywordsFor those of you still jumping into VB.NET I have compiled a list of new keywords available in .NET!! These will come in handy so have a sharp pencil ready.<br /><br />New Keywords:<br /><ul><br /><li>Continue</li><br /><li>Using</li><br /><li>My</li><br /><li>IsNot</li><br /><li>TryCast</li><br /></ul><br /><br />Below you will find quick explanations of each:<br /><br /><strong>Continue</strong>: Enables you to work through loops more logically in specific situations.<br /><br />Ex:<blockquote><br />For i As Integer = 0 To (s.Length() - 1)<br /> If (s(i).Equals(" ")) Then Continue For<br /> spaceCounter += 1<br />Next</blockquote><br /><br /><strong>Using</strong>: The Using keyword ensures that resources get destroyed as soon as possible instead of remaining in memory until the method is executed. No more waiting for garbage collection! Note that there is no need to <em>Dim</em> our object.<br /><br />Ex:<blockquote><br />Using conn as New SqlConnection<br /> <em>' use the conn object</em><br />End Using <em>' Automatically disposes our conn object</em></blockquote><br /><br /><strong>My</strong>: This new keyword is designed to quickly give you access to a large variety of resources you may need to access when developing your applications. Different implementations in ASP.NET and VB.NET / Winforms.<br /><br />Ex:<blockquote><br /><em>'Retrieve the computer name</em><br />Dim computername As String = My.Computer.Info.OSFullName</blockquote><br /><br /><strong>IsNot</strong>: The IsNot operator is the opposite of the Is operator.<br /><br />Ex:<br /><blockquote>If myObject1 IsNot myObject2 Then ...</blockquote><br /><br /><strong>TryCast</strong>: The TryCast statement attempts to cast without having to handle the invalid cast exception. If the cast is invalid a Nothing value is returned.<br /><br />Ex:<br /><blockquote>manager = TryCast(obj, Employee)<br />If manager IsNot Nothing Then<br /> <em>' use the manager object</em><br />End If</blockquote><br /><br />And that is that! Those are some extremely useful additions to the VB.NET language. Information was referenced from Professional ASP.NET 2.0, Appendix A. For further information and descriptions I highly recommend:<br /><br />Professional ASP.NET 2.0 <br />by Bill Evjen et al. <br />Wrox Press © 2006 (1290 pages) <br />ISBN:0764576100Denny Lovehttp://www.blogger.com/profile/12634298039265399265noreply@blogger.com2