ASP.NET - C# or Vb?

Soldato
Joined
18 Oct 2002
Posts
9,044
Location
London
Just curious..

I'm only starting out, i.e. I've just been trying to make a Hashtable, add some items, and print them out. I decided to use C# as everyone was harping on about it.

I did classic ASP (vbscript) before this, and found that I could use just about any case I like with that. However in the below snippet - C# needs 'New' to be in lower, 'If' to be in lower, and no 'T' in 'HashTable'.

Code:
if (Page.IsPostBack == true)
{
    Hashtable myHash = new Hashtable();
}

So that was an annoying half hour!
Does the same happen if I were using Vb? i.e. is it more 'forgiving'..
 
Shame it doesn't seem to correct them the other way around. I got into the habbit of writing asp/vbscript with "If .. Then" - just because it seemed easier to read than "if then" and you'd be surprised how hard it is to 'forget' these 'bad' habbits... :(
I'm sure in Java you could write HashTable and it'd work... I guess I just have to be more accurate from now on..
Unless my IDE probably changed it to Hashtable after I pressed the spacebar.

I like how you don't have to use the 'Java import' if you create your own classes. Some nice touches from a first look - others might take some time to get used to ;)

I made a GridView (note cap V...) and although the paging and sortable fields functions are amazing (no more boring rise-repeat code writing for me!) - shame it uses javascript to do this, I assume there's no workaround for it?
 
Last edited:
What I mean is - something like 10% of people don't have JavaScript enabled. So it's not good in that respect - compared to the hardcoded ASP stuff I've done in the past.
 
Just looking at that toolkit now... is it possible to do away with all the javascript hover stuff?
But more importantly, only show the submenu that you're on?
At the moment if you travel deep into the tree structure - it still shows the top level links first - so you have to again travel through all the structure just to get to the other links which are on your current sub-level...
 
Back
Top Bottom