If you haven’t yet used Page Methods then you’re really missing out. These allow you to create in-page web service methods that can then be called from the client.
This is a quick tip about where these methods can be embedded. It took me awhile to figure out why my newly added methods would not appear in the client javascript. I was using ASCX (user controls) and had the code in the user control code behind file. This will not work and the required javascript won’t ever get generated.
Page Methods must always be defined in the aspx.cs file!
-c
Some of you may already know this little asp.net secret but if you don’t enjoy :)
It appears that when an asp.net page renders due to the fact that the header element is actually being generated on the server before it is sent to the client some nifty things happen. I hope you already know that any style sheets placed in a theme folder will get added to the header automatically. This is really great but what if you want a style to be conditional?
Well, normally you’d put the css into another folder so it isn’t automatically added – for example you might use /css/ie_hacks.css or something like that. In the header you’d probably specify the css source as /css/ie_hacks.css but you can take a short cut. You can just use the style sheet name, ie_hacks.css and when the page is rendered the full path will be found.
I use this a lot with conditional IE hacks where I want a path rendered that I do not know during development since many of my site projects run mutiple clients under one site.
-c
I guess I had the name before I really figured out what it was, I mean I knew roughly what I wanted but building something completely revolutionary doesn’t happen over night.
This system will follow the “Mafooku” style of removing user barriers and keeping to the simple styles. That kind of development takes time but I expect something mid 2008.
So I leave you with this thought for now ….
“It is not possible to create what doesn’t exist.
We must assemble what does to create what doesn’t.”
I’ve launched a new service to sell online, its called Mafooku and well as you might have guessed you can find it at www.mafooku.com – users can post as many times as they like. The system is super simple and put from the ground up on .net to be extremely fast. You’ll also notice the lack of usage barriers! A good programming technique these days.
Give it a try! see what you can find.