Phil Sando

  Home  |   Contact  |   Syndication    |   Login
  13 Posts | 0 Stories | 3 Comments | 0 Trackbacks

News

Twitter












Archives

Image Galleries

Wednesday, February 10, 2010 #

This handy bit of sql code returns the last identity value inserted into an identity column in the current scope and sets its value to the parameter @ID

SET @ID = SCOPE_IDENTITY()

I found this a very useful thing to get to grips with and start using in my code. For further information on scope identity hit this msdn link

 


Exposing the property:

  
    Public Property stringproperty() As String
        Get
            Return _stringproperty
        End Get
        Set(ByVal value As String)
            _stringproperty = String.empty
        End Set
    End Property

Accessing the property from a content page:

You will need to add this line to your .aspx page in order to be able to access the property you just exposed

@ MasterType VirtualPath ="~/yourmasterpagename.master" %>

You will then be able to access the property programatically from your content page like this;

Master.stringproperty = foo