Update, I recommend also reading the following post after you read this one if you plan on using this within .Net 4: http://www.lacy.ie/updating-redirection-using-strong-types-to-net-4 It recently began to annoy me that every time I want to redirect to a page I have to use a string. Not a big deal I know but when you have broken [...]
I find mocking the http context rather difficult, you can’t inherit from it and making a wrapper class is a lot of work. Thankfully someone came up with a solution, unfortunately the link they included with the code is dead and I can’t seem to remember where I got the code, if anyone finds out [...]
First look at the official JqGrid ASP.Net Web Forms control here http://www.trirand.net/jqgrid.aspx Includes support for Linq and object data sources.
Taken from http://sadeveloper.net/forums/p/1195/5115.aspx Saved me a lot of hassle Edit: If you have the debug and the release folder this may not work on the debug folder dll. It didn’t work for me. We’ve got a 3rd party DLL that we use (not strong named) and I wanted to add it to the GAC. Alas! Only strong [...]
Get JqGrid here: http://www.trirand.com/blog/ So far I’ve seen two implementations of ASP.Net wrapper on JqGrid, one involves a httphandler and the other involves using a web service. Both add extra work onto the gridview/datasource pattern. Instead I had the JqGrid use a Callback Event Reference (Page.ClientScript.GetCallbackEventReference()) with async (a parameter) set to true, this allowed [...]
Taken from http://www.galcho.com/Blog/P… Here is how to call a method with an out parameter using MethodInfo.Invoke, in this case the out parameter is the last one (int). int parNum = 0; string parText = “99″; object[] methodParms = new object[] { parText, parNum }; MethodInfo methInfo = parNum.GetType().GetMethod(“TryParse”, new Type[] { typeof(string), typeof(int).MakeByRefType() }); methInfo.Invoke(null, [...]
I was writing an ASP.Net Dialog Control and I overwrote the Visible property to mean does the Dialog Control get displayed on the page initally, this defaulted to false. Later on I discovered that I couldn’t seem to register any javascript from the control. Turns out that it wasn’t being registered because of the lack [...]
I had a problem where I wanted to use the intellisense version of JQuery when I am writing the code, the normal version when I debug it and the minified when it actually hits production. I also wanted all this done on my master page so the path to the js file had to be [...]
I got the following on build until recently. Initializing IIS Web Server… Successfully created virtual directory ‘ycmbuild’. Granting IIS read access to the folder ‘C:\Projects\YourClubMatters\Trunk\YCM\WebSite_deploy\Release’. C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(676,5): error : Some or all identity references could not be translated. Warning: Unable to grant IIS access to folder ‘C:\Projects\YourClubMatters\Trunk\YCM\WebSite_deploy\Release’. Done building project “WebSite_deploy.wdproj”. ========== Rebuild All: 7 [...]
If you are using the Ajax Calendar Extender it might be worth looking at http://www.dotnetcurry.com/ShowArticle.aspx?ID=149&AspxAutoDetectCookieSupport=1 Its essentially a couple of tips for using it in common situations. One of the handiest for me was the ability to start by selecting the year, which makes much more sense when entering a date of birth.