| Joe's profileJoe MayoBlogLists | Help |
|
November 30 Suggestion for a New XHTML Element AttributeIn the past, I've made a lot of the C# Station links open new browser windows, especially when visiting an external site. There are pros and cons to this and I haven't heard any complaints in the 5.5 years that C# Station has been in operation. My motivation was that I figured a user would want to browse my site, especially the Tutorials and click a link here or there without having to leave the site. As many of you already know, I do this by setting the target attribute of my <a> to "_blank". Lately, I've been removing some of the target="_blank" attributes because I know that people are using tabbed browsers and opening another browser instance can be annoying - at least it is to me. So, I'm being a little proactive here. And yes, Firefox users, I'm thinking about you too.
I think XHTML should have an additional term added to the <a> target attribute for opening a page in a new tab. It could be called "tab", "_tab", or "JustOpenAnotherStinkingTab", but I care more about what it does than any particular naming convention as long as I can read it and it makes sense. That way, the tab with C# Station will still be there and the visitor can peek at other content without opening a new browser window.
Looking around for more information on the subject, here's what I found:
November 29 Another Reason for the CryptographicException: "Padding is invalid and cannot be removed." ErrorAfter switching ISPs with C# Station I was getting a rash of exceptions of the form:
CryptographicException: "Padding is invalid and cannot be removed."
After an extensive search of the Web, I found the following potential reasons:
I'm still not sure how I feel about Google caching my copyright materials, but maybe I shouldn't go there. An HttpWebRequest ExampleIt is always a pleasure to see people get value from my writing and put it to good use in helping them do their job. Here's an example from Kim Berry that uses my Fetching Web Pages with HTTP article. This code provides server-side includes from remote URLs, something which IIS server includes do not support. The code behind in the masterpage provides a remote source for the header and footer content for all aspx files that use that masterpage:
MASTERPAGE:
<% InsertRemoteHeader(); %> <body> <form id="form1" runat="server"> <div> <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> </asp:contentplaceholder>
</div> </form> </body> <% InsertRemoteFooter(); %> MASTERPAGE.CS public void InsertRemoteHeader() { InsertHtml("http://www.xxxx.com/remoteheadertest.aspx"); } public void InsertRemoteFooter() { InsertHtml("http://www.xxxx.com/remotefootertest.aspx"); } private void InsertHtml(string sURL) { StringBuilder sb = new StringBuilder(); byte[] buf = new byte[8192]; HttpWebRequest wReq = (HttpWebRequest)WebRequest.Create(sURL); HttpWebResponse wRes = (HttpWebResponse)(wReq).GetResponse(); Stream resStream = wRes.GetResponseStream(); string tempString = null; int count = 0; do { count = resStream.Read(buf, 0, buf.Length); if (count != 0) { tempString = Encoding.ASCII.GetString(buf, 0, count); sb.Append(tempString); } } while (count > 0); Response.Write(sb.ToString()); } Thanks to Mr. Kim for allowing me to blog this. November 22 C# Station on ASP.NET v2.0I finally finished converting the whole C# Station site over to ASP.NET v2.0. I know, it's a year late... It seems that I spend so much time working on other people's Web sites that I don't pay enough attention to my own - funny how that works out.
Anyway, I feel better because I got rid of a lot of gunk and designed everything into a nice n-tier architecture. The UI is still a little rough around the edges, but I'll clean that up gradually. November 09 .NET 3.0 and Vista ReleasedAni Babaian has some links for the new .NET 3.0 release.
Here are more .NET 3.0 and Vista links from MSDN.
Sam Gentile has a New and Notable blog on Vista RTMs. James Kelly reviews the C# Station TutorialHere's a C# Station Tutorial Review. Thanks James!
To clear up any confusion, go back to the C# Tutorial Lesson 4 and read the first four paragraphs prior to Listing 4-3 a little closer and you'll find that they are correct. Here's an example of where the initializer list and the iterator list would have a comma-separated list of expressions:
string source = "ReverseMe!";
char[] target = new char[source.Length];
for (int i = 0, j = source.Length - 1; i < source.Length; i++, j--)
{ target[i] = source[j]; } Console.WriteLine(target); BTW, bug and error reports are welcome. November 07 Microsft and Novell CollaborateIn a recent announcement, Microsoft and Novell will be collaborating on Linux and Windows interoperability and support. For many reasons, this is an interesting event. One thing that interests me is the fact that Novell has the Mono project, which is an open source version of the open standard Common Language Infrastructure (CLI). .NET is also based on CLI. Mono has a C# compiler too, meaning that it is possible to write cross-platform code.
From the Mono side, here's what Miguel de Icaza has to say:
After searching MSDN, Technorati, and Google, I haven't seen any Microsoft Employee blogs yet that have discussed it much. Maybe my search skills aren't as good as they should be. Let me know if you see some interesting Microsoft blog postings about this. |
|
|