Accessing PreviousPage Data with nested MasterPages.

October 8th, 2011 No comments

I encountered this problem today, that required a simply ugly solution, but this may prove useful to somebody out there. This is an ASP.NET C# Application in which I had a page (generated by nested MasterPages) that contains a GridView. The user selects a row in the GridView which triggers an event that Server.Transfers over to another page. Then, I wanted to be able to access a value in the selected row. This is more difficult than it would appear.

If you read most of the articles about accessing data using PreviousPage, they tell you to use PreviousPage.FindControl(“ControlID”). This works fine and well if and only you’re not using master pages. I then found an article about accessing controls on MasterPages which pushed me in the right direction. What I came up with was this beauty:

((GridView)PreviousPage.Controls[0].Controls[0].FindControl(“ContentPlaceHolder1″).FindControl(“ContentPlaceHolder1″).FindControl(“GridView1″)).SelectedRow.Cells[1].Text;

All told, it took me about twenty minutes, Google, the debugger, and drawing a couple of diagrams to figure out what the right reference to that cell was. If you’re in a similar bind, good luck.

Categories: Uncategorized Tags:

CloudFlare — Free DNS and a “Supercharged” website

August 23rd, 2011 1 comment

With the end of the EveryDNS era rapidly approaching, I started looking for another reliable free DNS service to host the DNS for the various websites I manage. In the midst of comparing various DNS solutions from the likes of Afraid and ZoneEDIT, I discovered a free DNS and then some service: CloudFlare.

CloudFlare provides free globally-distributed redundant DNS hosting, certainly — but it also provides (optional) free acceleration and content distribution for your website. Essentially, CloudFlare can be configured to act as a free reverse proxy for your site, caching all your static content and removing a lot of load on your server. Since it acts at the DNS layer, no sort of URL re-writing needs to be done and it’s completely transparent to the end user and you. Which is pretty cool.

Anyhow, I’ll follow up in a few weeks. And yes. This site? It’s CloudFlare accelerated.

Categories: Uncategorized Tags: ,

Another New PC

March 13th, 2011 No comments

I’ve finally got the last of the parts to complete my next PC build. This time, I’ve gone for budget high-end. (i.e., I spent more than $100 on a motherboard).

So far, I’ve got 8GB of DDR3-1600 (G.SKILL Ripjaws), the AMD Phenom II X6 1090T @ 3.0GHz, a Blue Window Cooler Master Elite 310 ATX case, 460W Cooler Master Elite Power Supply, 2x Cooler Master Sickle Flow 120 Case Fans, and an MSI M4A88TD-V EVO/USB3 Motherboard. I’m running Windows 7.

The OOB Windows Experience score is pretty good. I’m using integrated graphics, which is the apparent killer. I have no doubt that with a dedicated graphics card and SSDs/VelociRaptor, this machine would break 7.0 in all categories.

OOBE

Categories: Uncategorized Tags:

Ninite

March 13th, 2011 No comments

This is an absolutely fantastic tool for whenever you have to reinstall Windows, especially if you have to do it frequently. It allows you to pick from a bunch of software to create a single installer that you can run to download and install all that software. The installer can then be used again later to keep it up to date.

URL: http://ninite.com/

Categories: Computers, IT, Programs, Uncategorized Tags:

Network Defense Gone Wrong — IEEE Spectrum

February 8th, 2011 No comments

I came across this article in my stumblings across the internet. It was pretty interesting, actually.

http://spectrum.ieee.org/telecom/internet/network-defense-gone-wrong

Categories: Uncategorized Tags:

Time on VMWare Guests

November 21st, 2010 No comments

I recently discovered that the time on a VMWare guest can drift significantly based on server load if VMWare Tools are not installed or ntpd is not running. Prior to noticing this, I couldn’t really think of a good reason to install VMWare Tools on text based server guests. The improvements offered weren’t really necessary. However, an accurate clock is.

What I found most funny, however, is that my clock was running fast. About 10 minutes fast after 82 days. I didn’t realize my host was that undersubscribed.

21 Nov 20:15:48 ntpdate[2329]: step time server 91.189.94.4 offset -544.365060 sec

20:15:52 up 82 days, 11:24, 2 users, load average: 0.35, 0.32, 0.19

Categories: Uncategorized Tags:

Trunking on Cisco 3560

October 30th, 2010 No comments

I recently had a little problem with an uplink not autoconfiguring on a Cisco 3560 switch I manage, which caused that segment of the network to become unavailable. The entire switch is assigned to VLAN 1 with autoconfiguration on all ports, but for some reason, the trunk didn’t automatically connect. I noticed the problem by the fact that the stat light was orange and then by running show interface Fa0/23 (which was the port in question).

The solution was to force trunking, which you can do as follows:

1) Connect to the switch via serial and log in.
2) enable
3) configure terminal
4) interface Fa0/23 (or whatever is appropriate to your configuration)
5) switchport mode trunk
6) switchport trunk encapsulation dot1q

If everything starts working, do a “wr” to save your changes to startup-config

Categories: Uncategorized Tags:

Back in Business

October 17th, 2010 No comments

Ok. I finally got around to getting this back up and running. I think I deleted some content in so doing, but I’m not sure. Anyhow, I think I’ll be back to a more regular update schedule now. I’ll try for weekly, at least.

Categories: Uncategorized Tags:

New PC

NewEgg had some components on sale last week that I just couldn’t resist buying. I bought a new MicroATX Case, motherboard, AMD Athlon II X2 CPU, and some RAM So, shipping time and $225 later, I have a new PC.

Categories: Uncategorized Tags:

Free SSL Certificates from StartSSL

March 14th, 2010 No comments

StartSSL is a certification authority that offers basic validation, low-assurance SSL certificates free of charge. As of September 22nd, 2009, their root SSL certificate was included in the Microsoft Root CA bundle pushed to Windows computers using Windows Update. This means you can get free SSL certificates that work in IE, Firefox, Safari, etc. completely free. Keep it in mind for your next deployment of Exchange, Remote Desktop Gateway, etc.

If you require a higher assurance certificate, for $49 you can have your identity validated for two years through which you can issue any number of certificates. For an additional $49, you can get your organization’s identity validated. EV Certs are also available.

I think it’s about time someone’s done something like this. I mean really, how much effort could it be to issue minimal assurance SSL certs?

Categories: Uncategorized Tags: