in

ASP.NET Weblogs

rbfigueira.net

All about .net stuff, Compact framework, framework.net and personal projects.

October 2003 - Posts

  • DataBinder (Pros and Cons)

    DataBinder.Eval method saves you from writing complex expressions ;)

    BUT, using this method does impose a performance penalty on your code, because all the work it does is late-bound. Ok, if we want the fastest possible code, you can replace calls to DataBinder.Eval with explicit casts.

    For example:

    <%# DataBinder.Eval(Container.DataItem, “myField”,“{0:c}”) %>

    An equivalent expression using casts would be this:

    <%# String.Format(“{0:c}”,(CType(Container.DataItem,DataRowView)(“myField”))) %>

    Good ;)

    Posted Oct 19 2003, 01:54 PM by rbfigueira with 2 comment(s)
    Filed under:
  • VB.NET vs C# (best choice)

    I was reading this article and .... :
    http://www.aspnetpro.com/opinion/2003/09/asp200309en_o/asp200309en_o.asp

    "Whether it's just or not, C# developers make more money, get work more easily, and enjoy more prestige than VB developers."

    "ASPSOFT president and asp.netPRO columnist Jonathan Goodyear describes how, at his client's insistence, he converted a VB .NET code base to C#, then says, "The overwhelming majority of my clients ... are resolute in their insistence on our use of C# while building their software."

    Do you agree with this ?!!

    My simple conclusion:
    It's crucial to learn C# ;P

    Note: I prefer to do my stuff on vb.net but i know both languages (vb.net and c#) ;)

  • MSDN Event (Lisbon: 08 October)

    I was on the MSDN event (Lisbon: 08 October) – Portugal! Yes, that little country ;)

    They talk about programming with ADO.NET (good practices) ;)

    On “Errors on Stored Procedures” subject:
    “ Informative messages (severity <=10) can be capture by ADO.NET” by Vasco Nunes

    Example:
    “Conn” is your connection
    We can build one event handler on infoMessage (connection), like this:

    AddHandler conn.infoMessage, New SqlClient.SqlinfoMessageEventHandler(Addressof MessageEventHandler)

    Sub MessageEventHandler(ByVal sender As Object, ByVal e As SqlClient.SqlinfoMessageEventArgs)

        ‘do whatever

    End Sub

    Great ;)

More Posts