Friday, November 27, 2009

Back to being a Geek!

Learning Problems
I've been getting into programming stuff in C# and ASP.NET over the last few days, so you're in for a sprinkling of geeky advice for the next few weeks, as I work through the insanities of working with MS development.

Firstly, I'm using the 2008 Express versions of both. I bought a small book "Build a Program Bow!" by Patrice Pelland of MS that has SP1 versions of all the express systems (VB, C#, C++, Web Developer) and also a=one of SQL Server. I already have a developer copy of 2005 installed, so I didn't need to install that. The rest went in fine, and the C# part works fine - better than the full version of VS 2005,

Using ASPX hasn't turned out so easy, however. I ran into a lot of permissions problems, because I'd never used the IIS on the PC, despite it being almost four years since it was installed on my laptop! Eventually, by the expedient of making all folders open for everything, it started working. Then, of course, something else cropped up! The error message was this:
BC2017: could not find library 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0_b03f5f7f11d50a3a\System.EnterpriseServices.dll'
After a lot of searching I figured out that this file was sitting in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727, so I copied it over. Fine. Then I got exactly the same message for System.EnterpriseSeervices.Wrapper.dll. Same procedure to fix. All went well. However, after I'd rebooted it all went away and I had to copy the stuff over again! Drat!! Now I have a batch file!

Chrome Problems
Here's another interesting tidbit. I wrote a really simple piece of ASPX (below). It shows two buttons on a browser page and, depending on which one you click, changes the caption on the button. It all works fine on IE 7 (like you'd expect anything else!) on my local IIS server. However, Google's Chrome apears to have some problems with this: one button works fine but the other doesn't always do so well. Try it out and tell me if it's just my copy of Chrome!

[script runat="server"]
'----------------------------
Sub submit(Source As Object, e As EventArgs)
if button1.Text="You clicked me!" then
button1.Text="Click me!"
else
button1.Text="You clicked me!"
end if
End Sub
'----------------------------
Sub submit2(Source As Object, e As EventArgs)
if button2.Text="Boo!" then
button2.Text="Click me!"
else
button2.Text="Boo!"
end if
End Sub
'----------------------------
[/script]
[html][header][/header]
[body]
[form runat="server"]
[asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit" /]
[asp:Button id="button2" Text="Click me!" runat="server" OnClick="submit2" /]
[/form]
[/body]
[/html]
'----------------------------



Blogger Change
Have you noticed that Blogger has added a new editor? It has a nice control bar for selecting things like fonts, etc., but, right now, it doesn't appear to allow you to paste anything in! That makes life a little difficult!

That's all for now ...
TTFN

No comments: