News Archives 
   
(click month to expand)
  

Recent Technology News Stories

Solentive News
OnLoggingIn Custom Method  [click for more...]
By Nannette Thacker

When you use the Login control in the toolbox, it generates code that looks like this:

<asp:Login ID="Login1" runat="server">
            </asp:Login>

And from design view, it looks something like this (depending on your background):


When a user then uses the log in control to log into the site, ASP.NET sends them to the ValidateUser function in the MembershipProvider class.

But what if you want to run your own custom code prior to validating the user? You can add your own "OnLoggingIn" method.

Microsoft provides more information on the OnLoggingIn Method and explains that it "Raises the LoggingIn event when a user submits login information but before the authentication takes place." See this article on the Login.LoggingIn Event also. Both articles have some examples of this in use. You might also want to see the Login Control Events section of the ASP.NET Page Life Cycle Overview document.

So in effect, if you are using a Login control and you want to run your custom log in code before the system handles the log in, you may use the "OnLoggingIn" property to access your custom function.

<asp:Login ID="Login2" runat="server" 
    OnLoggingIn="Login1_LoggingIn">
</asp:Login>
Notice I simply added this property to the log in control:

OnLoggingIn="Login1_LoggingIn"
You'll put your Login1_LoggingIn method in your code behind:
Protected Sub Login1_LoggingIn(ByVal sender As Object, _
        ByVal e As System.Web.UI.WebControls.LoginCancelEventArgs)
        ' pre log in code goes here
End Sub
Nannette
"No power in the verse can stop me." - River, Firefly
30/01/2008   [Link]
Compatibility of bit type between SqlServer 2000 and SqlServer 2005  [click for more...]
Yesterday I had to debug an issue of a product that we are deploying to a production server. We were developing using SqlServer 2005 (express) and the hosting company uses SqlServer 2000 and as soon as we deploy, we got the following exception on one of the operations: "Syntax error converting the varchar value 'true' to a column of data type bit" After some debugging (a couple of hours) and after deploying some special debugging versions, we found the issue. In SqlServer 2005, the following query...(read more)
30/01/2008   [Link]
Extension methods around the Typemock Community Edition  [click for more...]

iridescence posted about his own wrapper API to Typemock community edition, using .net 3.5 extension methods. What this means is that you can now use the community edition of typemock and not resort to use strings in your mocks (the enterprise and pro edition do support "natural mocks" which have strong typing support)

Coolness.

30/01/2008   [Link]
Enhancing the Class with Windows Meeting Space  [click for more...]

windows meeting space On day two of teaching Advanced ASP.NET 2.0 at Interface Technical Training, I implemented a newly discovered feature that allows students to easily follow along in the class - Windows Meeting Space. 

Windows Meeting Space is an application included with the Vista operating system that allows someone to host a virtual meeting, and enable participants to view the host's desktop (or specific application like Powerpoint) on his/her monitor.  It is also a great way to share codes samples and files instantly through a feature called "handouts". 

I am very pleased to use this in the classroom.  I am not the only one who sees the value.  Already, some of my students who are "pair-programming" during the project assignments are using this application to view the other teammate's monitor and share files.

If you are running Vista and have not explored this feature yet - check it out!

Technorati Tags:
30/01/2008   [Link]
Redmond here I come!  [click for more...]

Redmond...

Yesterday I was invited by Microsoft for a TTT(Train the Trainer) covering Sql Server 2008. It will be my first stay ever in the USA. I Hope to see some cool stuff and meet some interesting people at the Microsoft facility and to come back with tons of information to blog about.

For now I'm feeling just proud to be invited by Microsoft.

30/01/2008   [Link]
BUG UPDATE: Using Custom Identities in ASP.NET fails when using the ASP.NET Development Server  [click for more...]

Sometime ago I reported this bug. Looks like there's a workaround for it. Find more about it here.

30/01/2008   [Link]
Copyright © 2007 Solentive | Disclaimer | Contact | Home