Archive for July, 2012
Reflecting Parameters
I got a question last week from a gentleman asking how to tell what parameters were available for a particular method. This is useful when you know that a method will be available on a class you are calling, but the method could have any parameters, or when you have used reflection to get the list of methods in your class, and need to pull out the parameter list for each.
The solution is actually quite simple:
Republished by Blog Post Promoter
DotNetNuke: Staging Content Using Roles
The problem:
Currently DNN only lets us stage content using the Text/HTML module and only if you have the pro or enterprise version of DotNetNuke. There are three issues with this:
- We can only stage HTML content. Other modules need to resort to some other method.
- We can’t see what the full site is going to look like when all of the staging content goes live.
- There is no easy way to stage navigation changes.
In a typical development environment changes to code and content are typically made to a staging area. The client is able to review the changes in this area and when the changes are finally approved, the content can be pushed to production.
Again, DNN has limitations. While I have been able to figure out how to do an “all or nothing” push from stage to production without over-writing user content or membership information, doing partial pushes to production have been problematic at best.
jQuery – Calling Your Own Functions
While jQuery has a lot of functionality built into it, you may find that you have a need to implement your own functions and attach them to the jQuery framework in some way.
There are two ways to do this. You could extend the framework by creating a plug-in or you could use one of the built-in functions and simply tell it to call your function. For one-off implementations, using the function is easier and recommended. But if you are going to reuse the code between multiple projects you’ll want to implement the added functionality as a plug-in.
Today, we’ll look at using the built-in function.
Republished by Blog Post Promoter
CSharp’s Property Shortcuts
There are a lot of nice shortcuts in the CSharp language that most of us never use. But if you take the time to learn them, you can be as productive as a student I had who had learned all the keyboard shortcuts to windows so that he never had to take his hands off the keyboard.
It was just a bit frustrating as an instructor because every time he sat down to do an exercise he’d be asking, “what’s the keyboard shortcut for this step?” I have to admit, though, he was definitely faster than anyone else who had ever taken the class.
prop and propg are two such shortcuts.
Republished by Blog Post Promoter