Come on - give it a go yourself - we wont laugh I promise :)
Couple of hints:
- Len(string) <=> string.Length
- Right(string,num) <=> string.Substring(string.Length - num)
- OrElse <=> ||
Or just use on of the many free tools:
http://www.carlosag.net/Tools/CodeTranslator/
Also, you are doing the following operation twice:
Code:
Path.GetFileNameWithoutExtension(DataBinder.Eval(e.Item.DataItem, "Name").ToString())
It would be better to assign this value to a temporary variable and then your second line becomes:
Code:
hl.Text = Right(filename, Len(filename)-4)
Much easier to read I think you'll agree.
/- Sam Judson : Wrox Technical Editor -/