SQL Server DateDiff one day short

by ebarcza 7/28/2009 12:05:00 PM

Simple Solution to this really...

DateDiff(d, periodStart, periodEnd +1)




Firing Update Panel From A GridView Button

by rBellantoni 7/22/2009 7:22:00 AM

Here's how to fire an update panel from a gridview:

 In the RowCreated event of your gridview you need to register the button as an asyncpostback trigger:


 Then just call the update panel you would like to update in the button's click event


Tags: , , ,


ViewState property - maintaining variable between page loads without hidden field or form controls

by ebarcza 7/22/2009 7:09:00 AM

Pretty darn simple actually:

protected string SortExp
            if (ViewState["SortExp"] = null)
                ViewState["SortExp"] = "PoolName";
            return ViewState["SortExp"];
            ViewState["SortExp"] = value;

I this case I am using this viewstate property to save the current sort direction of a gridview, Sorting will be covered in another post!



Ajax Loading Gif Generator

by rBellantoni 7/20/2009 8:18:00 AM

This website has one of the best ajax loading gif generators i've used and is completely free and customizable!



.NET | BlogEngine.NET | VB.NET

Int.Parse vs Convert.ToInt32

by rbellantoni 7/20/2009 4:38:00 AM
The main difference between Int.Parse and Convert.ToInt32() is that the convert will not throw a reference exception when it is passed a null, it will instead return a 0. Int.Parse however as well all know will throw a NullReference exception and crap out on ya.



FCKEditor PHP List Not Working

by rBellantoni 7/20/2009 4:24:00 AM

After moving an install of PHPList to a different server, the FCK editor stopped showing up. I tried all the fixes on phplist to get it to work, however NONE of these fixes work for the NEWER version of phplist. Some of the older fixes included changing asp_tags On in Php.ini and set them to off, however with the newer versions of the phplist you need to change the fckeditor.html page in the FCKEditor/editor/fckeditor.html it should look like this when you're done:

// Base configuration file.
LoadScript( '../fckconfig.js' ) ;
//LoadScript( '../../?page=fckphplist&action=js4' )
Once I did this everything came up and worked great!




Immediate IF C#(conditional operator)

by ebarcza 7/20/2009 3:51:00 AM

condition ? first_expression : second_expression; also can be described as <bool condition> ? <true value> : <false value>;

IF condition evaulates to true then return first_expression; IF condition evaulates to false then return second_expression



int retVal;

retVal = x > 0 ? 100 : 200;


There is no Dana, Only Zuul

by ebarcza 7/17/2009 12:39:00 PM
Dr. Peter Venkman: What I'd really like to do is talk to Dana. Dana? It's Peter.
Dana Barrett: There is no Dana, there is only Zuul.
Dr. Peter Venkman: Oh, Zuulie, you nut, now c'mon. Just relax, c'mon. I want to talk to Dana. Dana, Dana. Can I talk to Dana?
Dana Barrett: [in an inhuman demonic voice] There is no Dana, only Zuul!
Dr. Peter Venkman: What a lovely singing voice you must have.


Powered by BlogEngine.NET
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail


<<  September 2022  >>

View posts in large calendar

Recent comments



The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2022

Sign in