1.5 days banging my head against a brick wall - ViewState not being loaded for dynamically added controls. ScottGu sorted it out:
http://scottonwriting.net/sowblog/posts/2129.aspx
DaddyCode Team Blog
C# , ASP.NET, MVC, SQL, Sharepoint, JQuery and nowt else from a Web Developer in Leeds
15 Jun 2007
16 Apr 2007
GridView Row-Click
A simple way to add "select on row-click" functionality to GridView without causing Event validation errors:
And how do you handle the click? Just hook up to the GridView's SelectedIndexChanged event handler and check the GridView.SelectedValue property.
ps. for row-hover and striping fun, why not use JQuery? Just implement the grid's RowStyle.CssClass (e.g. set it as 'zootGridRow') and set some style directives to handle the following classes...
protected override void OnRowCreated(GridViewRowEventArgs e)
{
base.OnRowCreated(e);
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onClick"] = "this.style.cursor = 'wait';"
+ Page.ClientScript.GetPostBackEventReference(this, "Select$" + e.Row.RowIndex.ToString(), true);
}
}
And how do you handle the click? Just hook up to the GridView's SelectedIndexChanged event handler and check the GridView.SelectedValue property.
ps. for row-hover and striping fun, why not use JQuery? Just implement the grid's RowStyle.CssClass (e.g. set it as 'zootGridRow') and set some style directives to handle the following classes...
$(function() {
// Implement grid-row striping
$('#myGrid .zootGridRow:odd').addClass('zootGridAlternateRow');
// Implement grid-row hover animation
$('#myGrid .zootGridRow').hover(function(){$(this).addClass('zootGridRowHover')},
function(){$(this).removeClass('zootGridRowHover')});
});
9 Apr 2007
Roman Holiday
Sarah and I went to Rome for Easter 2007 - Friday to Monday. Wow! What a city. We saw loads of amazing stuff that really blew our minds. We think we have archaeological history in Britain - but in Rome it's still standing! Amazing.
Anyway, click this post's title if u wanna see pics.
Just want to give mad props to the hotel we stayed at: The Mecenate Palace. This is conveniently located within suitcase-dragging distance from Termini train station, and is just off the Plaza di Santa Maria Maggiore - which the terrace roof garden overlooks for breakfast. We booked in there via Last Minute and managed to get a lovely Executive Floor room - all wood floors and a jacuzzi bath. Really good.
Oh and boooo to the Restaurant Diocleziano on the Via Viminale, where we had crappy italian food on the first night, which I didn't think was possible!
Anyway, click this post's title if u wanna see pics.
Just want to give mad props to the hotel we stayed at: The Mecenate Palace. This is conveniently located within suitcase-dragging distance from Termini train station, and is just off the Plaza di Santa Maria Maggiore - which the terrace roof garden overlooks for breakfast. We booked in there via Last Minute and managed to get a lovely Executive Floor room - all wood floors and a jacuzzi bath. Really good.
Oh and boooo to the Restaurant Diocleziano on the Via Viminale, where we had crappy italian food on the first night, which I didn't think was possible!
6 Feb 2007
What I Done For Christmas
- I done broke my arm
- I done crashed my motorbike*
- I done quit my job for no apparent reason
Life is so weird to begin with, and then suddenly it gets weirder without warning. You think that surely some fundamental law of the universe will stop you from stepping further out of the boundary, but no! It's not necessarily good out there - and I don't advise you all to go, but it is different.
* Okay can I cast some advice out to the ether in the forlorn hope that it'll save someone's bacon and/or dosh.
- Get some sticky all-weather tyres for your bike. No arguments.
- Comprehensive insurance is SHITLOADS cheaper than fixing your knackered bike. Try a grand cheaper. Just do it.
4 Nov 2006
PHP4.4 and Apache2.2 on Windows XP
Had loads of fun trying to set PHP 4.4 and Apache 2.2.3 up on my XP machine. After making the required PHP mods to the httpd.conf file, Apache would not restart with an "Operation Has Failed" dialogue. Running httpd.exe -t from the command line gave me the following:
httpd: Syntax error on line 115 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/php4apache2.dll into server: The specified module could not be found.
But the DLL was definitely there!
Only after lots of fruitless searching did I notice that the PHP install notes only mention Apache 2.0, not 2.2. So I did a specific search and found the work of the dudes at ApacheLounge: http://www.apachelounge.com/download/
Their version of the DLL compiled for 2.2.x works a treat. Huzzah!
httpd: Syntax error on line 115 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/php4apache2.dll into server: The specified module could not be found.
But the DLL was definitely there!
Only after lots of fruitless searching did I notice that the PHP install notes only mention Apache 2.0, not 2.2. So I did a specific search and found the work of the dudes at ApacheLounge: http://www.apachelounge.com/download/
Their version of the DLL compiled for 2.2.x works a treat. Huzzah!
29 Oct 2006
Fog Gone!
So the other night I rode my bike down the A64 to my friend's house, and it was v. dark, and lo - my visor foggeth up and I could not see a bleedin' thing.
So I thought that was the end of my winter bike fun. However, turns out that my X-Lite X601 helmet features a Pinlock-compatible system. Basically this means you can buy an 'insert' which looks just like a cheap bit of perspex which fits inside the visor, and is held in place by two pins. So I did - those fine (but morose) chaps at Hein Gericke York had one in stock for 18 quid. Had a big ride around the Dales today and NO FOG AT ALL. Heaven knows I tried - deep breaths into the helmet - the visor surrounding the insert fogged up a treat, but the insert remained clear as day.
Amazing stuff, I order you to buy one immediately.
Now all I need is a new seat for my CBR, my bum is killing me now ;)
So I thought that was the end of my winter bike fun. However, turns out that my X-Lite X601 helmet features a Pinlock-compatible system. Basically this means you can buy an 'insert' which looks just like a cheap bit of perspex which fits inside the visor, and is held in place by two pins. So I did - those fine (but morose) chaps at Hein Gericke York had one in stock for 18 quid. Had a big ride around the Dales today and NO FOG AT ALL. Heaven knows I tried - deep breaths into the helmet - the visor surrounding the insert fogged up a treat, but the insert remained clear as day.
Amazing stuff, I order you to buy one immediately.
Now all I need is a new seat for my CBR, my bum is killing me now ;)
25 Oct 2006
Some Product Reviews
Thought I'd take a second to give some mad props to various software products I've been using recently.
First off, thanks to Innovasys for their nifty DocumentX and HelpStudio2 applications. These have allowed me to write professional-quality .NET 2.0 documentation for NetBuild CMS. DocumentX automagically collates all the XML comments that I've put in my code via VisualStudio and includes them with full Class and Member reference documentation. HelpStudio2 then integrates with my DocumentX project and allows me to write nice looking HTML help and tutorials. It has good built-in tools for screenshots - I especially like the User Interface Mapping tool which quickly lets me add bullets to screenshots for easy reference in my help text. Then I can create the documentation in plain HTML, CHM and PDF. Saved loads of time. I also got good phone support when I had a problem.
The other product I have been impressed with is XHEO Licensing 2.1 which has very quickly allowed me to add flexible licensing options to the NetBuild Suite products. You just need to point the License Manager at your .NET project and it does its stuff. Recompile your Assembly and it's ready to rock. Then you can issue licenses with a range of 'limits' like "Only allow to run from the following Domain Name(s)". Hats off to these guys.
Right, back to the NetBuild CMS v8.5 code face.....
First off, thanks to Innovasys for their nifty DocumentX and HelpStudio2 applications. These have allowed me to write professional-quality .NET 2.0 documentation for NetBuild CMS. DocumentX automagically collates all the XML comments that I've put in my code via VisualStudio and includes them with full Class and Member reference documentation. HelpStudio2 then integrates with my DocumentX project and allows me to write nice looking HTML help and tutorials. It has good built-in tools for screenshots - I especially like the User Interface Mapping tool which quickly lets me add bullets to screenshots for easy reference in my help text. Then I can create the documentation in plain HTML, CHM and PDF. Saved loads of time. I also got good phone support when I had a problem.
The other product I have been impressed with is XHEO Licensing 2.1 which has very quickly allowed me to add flexible licensing options to the NetBuild Suite products. You just need to point the License Manager at your .NET project and it does its stuff. Recompile your Assembly and it's ready to rock. Then you can issue licenses with a range of 'limits' like "Only allow to run from the following Domain Name(s)". Hats off to these guys.
Right, back to the NetBuild CMS v8.5 code face.....
12 Oct 2006
Gnews
Here's the news, news shrews.
Bike
I bought a 1999 Honda CBR600F FX in Black n' Silver n' Yeller. And it's pretty good. Scary fast. Makes a hell of a lot of clattery noises but apparently that's normal. Always starts first time. Wish it had a clock though, I never know what time it is!
House Move
I done moved to Tadcaster near York. It's RUBBISH. Be moving again soon!
Wharfedale 21" CRT Television CTV2185RF
Was Crap, took it back.
Wharfedale Freeview Receiver DV832B
Was Good, kept it!
X-Arcade Trackball
Good at what it does - but expensive and was totally bored of it after one evening! So I told her to sling her hook and spent the next night playing Marble Madness on this instead, coolio!
Mohhh
Bike
I bought a 1999 Honda CBR600F FX in Black n' Silver n' Yeller. And it's pretty good. Scary fast. Makes a hell of a lot of clattery noises but apparently that's normal. Always starts first time. Wish it had a clock though, I never know what time it is!
House Move
I done moved to Tadcaster near York. It's RUBBISH. Be moving again soon!
Wharfedale 21" CRT Television CTV2185RF
Was Crap, took it back.
Wharfedale Freeview Receiver DV832B
Was Good, kept it!
X-Arcade Trackball
Good at what it does - but expensive and was totally bored of it after one evening! So I told her to sling her hook and spent the next night playing Marble Madness on this instead, coolio!
Mohhh
20 Jun 2006
Motorbike / Motorcycle Training
So for some reason I decide I wanted to learn to ride a bike! A proper 500cc bike that is, so I booked a course with West Pennine Motorcycle Training in Blackburn, UK. I got 4 days of tuition and then did the test on the morning of the 5th day. I passed, yay! It wasn't easy but it was pretty amazing seeing as I never rode on a bike before.
Big thanks to Alan and Kevin from the course. And if anyone is considering the residential course, can I just warn you that the St Albans Guest House (the one they book you into) is like something out of a George Orwell novel.
Right I'm off to buy a bike :)
Big thanks to Alan and Kevin from the course. And if anyone is considering the residential course, can I just warn you that the St Albans Guest House (the one they book you into) is like something out of a George Orwell novel.
Right I'm off to buy a bike :)
Visual Studio Solution Statistics
Usysware's DPACK is cool and amongst other things, can tell you how many lines of code you've written in your giant .NET projects :)
Subscribe to:
Posts (Atom)
If I helped you out today, you can buy me a beer below. Cheers!