﻿<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
  <title>AtaYe Blog</title>
  <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog" title="AtaYe Blog" />
  <tagline>General tech</tagline>
  <id>http://blog.ataye.com.au/pt/feeds/atom.xml</id>
  <generator>Presstopia</generator>
  <copyright>Copyright (c) 2009 AtaYe Blog</copyright>
  <modified>2009-02-14T09:35:27Z</modified>
  <entry>
    <title>Fix Exchange 2007 OWA</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=11&amp;t=Fix-Exchange-2007-OWA" title="Fix Exchange 2007 OWA" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=11&amp;t=Fix-Exchange-2007-OWA</id>
    <modified>2009-02-14T09:35:13Z</modified>
    <issued>2009-02-13T08:50:00Z</issued>
    <created>2009-02-13T08:55:36Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Had a problem with Exchange recently which required me to fix the security settings for all the IIS virtual directories for Exchange 2007 web access.&amp;nbsp; To fix i had to remove and then re-install the Client Access Server role.&amp;nbsp; The following article outlines how to do this not just with 2007 but also with 2000 and 2003:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.microsoft.com/kb/320202"&gt;&lt;FONT size=2 face=Verdana&gt;http://support.microsoft.com/kb/320202&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;To summarise, open command prompt and enter the following commands (One at a time):&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class=userInput&gt;&lt;FONT size=2 face=Verdana&gt;exsetup.exe /mode:uninstall /roles:ca&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI&gt;&lt;SPAN class=userInput&gt;&lt;SPAN class=userInput&gt;&lt;FONT size=2 face=Verdana&gt;exsetup.exe /mode:install /roles:ca&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;SPAN class=userInput&gt;&lt;SPAN class=userInput&gt;Cheers,&lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=userInput&gt;&lt;SPAN class=userInput&gt;James&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>Flash Actionscript CS3 Tween Brightness</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=10&amp;t=Flash-Actionscript-CS3-Tween-Brightness" title="Flash Actionscript CS3 Tween Brightness" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=10&amp;t=Flash-Actionscript-CS3-Tween-Brightness</id>
    <modified>2009-02-14T09:35:27Z</modified>
    <issued>2009-01-31T00:24:00Z</issued>
    <created>2009-01-31T00:38:53Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Onto Flash now.&amp;nbsp; After a lot of searching and dead ends (And flash CS3 docs giving code for AS2!) i finally figured out an easy way to tween brightness of an object.&amp;nbsp; As this uses the Colour (Color) matrix&amp;nbsp;transformations this also applied to colour tweening.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;The Method:&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Perform a tween on a new object, and set it to tween an arbitrary property.&amp;nbsp; Set the easing and brightnes values (between 0 for&amp;nbsp;dark and 255 for light), and timings as needed.&amp;nbsp; Then add a listener for TweenEvent.MOTION_CHANGE.&amp;nbsp; Within this event we build a brightness colour matrix using the current tween position and apply to the mc.filters array!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;The Code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;import fl.transitions.Tween;&lt;BR&gt;import fl.transitions.TweenEvent;&lt;BR&gt;import fl.transitions.easing.*;&lt;BR&gt;import flash.filters.ColorMatrixFilter;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;var&lt;/FONT&gt; tw:&lt;FONT color=#0000ff&gt;Tween&lt;/FONT&gt; = &lt;FONT color=#0000ff&gt;new Tween&lt;/FONT&gt;(&lt;FONT color=#0000ff&gt;new Object&lt;/FONT&gt;(),&lt;FONT color=#008000&gt;"x"&lt;/FONT&gt;,&lt;FONT color=#0000ff&gt;None.easeNone&lt;/FONT&gt;,200,0,5,&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;);&lt;BR&gt;tw.&lt;FONT color=#0000ff&gt;addEventListener&lt;/FONT&gt;(&lt;FONT color=#0000ff&gt;TweenEvent.MOTION_CHANGE&lt;/FONT&gt;, &lt;FONT color=#0000ff&gt;function&lt;/FONT&gt;(e:&lt;FONT color=#0000ff&gt;TweenEvent&lt;/FONT&gt;):&lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;var&lt;/FONT&gt; val:&lt;FONT color=#0000ff&gt;Number&lt;/FONT&gt; = e.&lt;FONT color=#0000ff&gt;position&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;var&lt;/FONT&gt; brightness_array:&lt;FONT color=#0000ff&gt;Array&lt;/FONT&gt; = [1, 0, 0, 0, val,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, 1, 0, 0, val,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, 0, 1, 0, val,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, 0, 0, 1, 0];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mc.&lt;FONT color=#0000ff&gt;filters&lt;/FONT&gt; = [&lt;FONT color=#0000ff&gt;new ColorMatrixFilter&lt;/FONT&gt;(brightness_array)];&lt;BR&gt;&amp;nbsp;});&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;I hope this helps someone out there!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Cheers,&lt;BR&gt;James&lt;/FONT&gt;&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>Devsta 2008 Gadget</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=9&amp;t=Devsta-2008-Gadget" title="Devsta 2008 Gadget" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=9&amp;t=Devsta-2008-Gadget</id>
    <modified>2008-11-06T14:25:59Z</modified>
    <issued>2008-10-13T11:51:00Z</issued>
    <created>2008-10-13T11:55:11Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;Hello again,&lt;/P&gt;
&lt;P&gt;Since entering into the Devsta challenge 2008, i have been watching the devsta Vista sidebar gadget and waiting for it to countdown the draw results.&amp;nbsp; Instead i have been watching 00:00:00:00!&lt;/P&gt;
&lt;P&gt;Well not anymore!&amp;nbsp; I have modified the gadget to actually countdown the draw (well, until 8AM on 29th October).&amp;nbsp; I have also modified it so that it actually displays the correct icon in the gadget pane, and when dragging onto the sidebar.&amp;nbsp; You can download from the following URL (Its safe, i promise):&lt;/P&gt;
&lt;P&gt;&lt;A href="/pt/uploads/devsta.gadget"&gt;Devsta Gadget Download&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now you can sit and wait and watch the countdown!!&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;James&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>Microsoft Devsta 2008 submission - Ataye Ascii Image Viewer - 5th Place!!</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=8&amp;t=Microsoft-Devsta-2008-submission-Ataye" title="Microsoft Devsta 2008 submission - Ataye Ascii Image Viewer - 5th Place!!" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=8&amp;t=Microsoft-Devsta-2008-submission-Ataye</id>
    <modified>2009-01-24T10:34:34Z</modified>
    <issued>2008-10-07T13:32:00Z</issued>
    <created>2008-10-07T13:36:16Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;UPDATE: Well i came in at 5th place, and wn $2000 worth of prizes, i'm pretty chuffed :D&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Its been a while since i've updated this blog so I am finally updating with my entry in the Microsoft Devsta 2008 competition.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;In keeping with the old school demo and graphics scene, i have created an ascii image viewer.&amp;nbsp; It&amp;nbsp;takes you back to the old image rendering method of using text to display graphics.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;It is also complete with an ascii based intro / demo.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Whats different about this??&amp;nbsp; It take an 'old school' methodology and re-creates it using new cool technologies like GDI+ with Visual Studio 2008.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Verdana&gt;Lets see how it goes :O)&lt;/FONT&gt;&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>HttpListener using SSL</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=7&amp;t=HttpListener-using-SSL" title="HttpListener using SSL" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=7&amp;t=HttpListener-using-SSL</id>
    <modified>2008-06-22T09:10:47Z</modified>
    <issued>2007-12-31T12:53:00Z</issued>
    <created>2007-12-31T13:03:47Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I have been trying for a while to get the HttpListener to work with SSL (vs2005 on XP SP2)&amp;nbsp;and finally i got a break through.&amp;nbsp; All info i've found so far points to making a certificate and using httpcfg to bind the certificate to the given prefix endpoint.&amp;nbsp; I followed instructions but still it would not work &lt;FONT size=1&gt;(see link below, this was most helpful)&lt;/FONT&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://answers.google.com/answers/threadview?id=735306" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;http://answers.google.com/answers/threadview?id=735306&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=1&gt;(btw, dont change 0.0.0.0: to your ip address, leave it as is ;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;So after looking into the MSDN docs some more and playing with the httpcfg tool i found i needed to not only bind the certificate to the endpoint but also to the application.&amp;nbsp; You do this by passing the applications GUID to the set ssl command!!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Following are some commands i used to figure things out a bit:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #deb887" face=Verdana size=2&gt;httpcfg query ssl &amp;lt;-- get a list of bound certificates&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;and found the guid empty.&amp;nbsp; So i deleted any bound certificates:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #deb887" face=Verdana size=2&gt;httpcfg delete ssl -i 0.0.0.0:90&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Then re issued the httpcfg set ssl command and specified the GUID from my vs2005 projects AssemblyInfo.cs, under [assembly: Guid("xxx")] as in:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #deb887" face=Verdana size=2&gt;httpcfg set ssl -i 0.0.0.0:8585 -c "MY" &lt;BR&gt;-g {E27BC593-0E2b-4043-AA07-1DBAFD724990}&amp;nbsp;&amp;nbsp; &amp;lt;-- App GUID&lt;BR&gt;-h 99F065C41348FBFB261E959C1A76892E91176999 &amp;lt;-- Cert footprint&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Then i reran my app and it worked (it complained about an invalid certificate, but it is a test certificate)!!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;Now this is a bit interesting:&amp;nbsp; I moved my certificate from LOCAL_MACHINE\Trusted Root Certification Authorities\Certificates into LOCAL_MACHINE\Personal\Certificates before i used httpcfg.&amp;nbsp; This seems contrairy to previous advice of leaving it in Trusted Root store but i guess this is because im running on my dev machine, not prod server!!&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I hope this sheds some light on using HttpListener with SSL.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;cheers&lt;BR&gt;James&lt;/FONT&gt;&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>Using Clientside Validator</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=6&amp;t=Using-Clientside-Validator" title="Using Clientside Validator" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=6&amp;t=Using-Clientside-Validator</id>
    <modified>2008-06-22T09:11:22Z</modified>
    <issued>2007-10-28T13:12:00Z</issued>
    <created>2007-10-28T13:26:13Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Hello,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;To use the client side validator you first need to add one to your page.&amp;nbsp; Then in html view add a new javascript method as follows: (Im using the dotnet v2.0)&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;&lt;FONT color=#a31515&gt;script&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;type&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;="text/javascript"&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;function&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt; ValidateClientItem(sender, args)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt; sMyVal = args.Value;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;if&lt;/FONT&gt; (sMyVal != sValidString&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args.IsValid = &lt;FONT color=#0000ff&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; args.IsValid = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Tahoma&gt;&lt;FONT size=2&gt;;&lt;BR&gt;}&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515&gt;script&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Then, set the ClientValidationFunction property of the custom validator to the name of the function, in this case 'ValidateClientItem'.&amp;nbsp; You dont need to set ControlToValidate if you dont want, but you wont be able to use args.Value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Thats all there is to it.&amp;nbsp; When the client form is submitted, the validator is called and will in turn call your client side javascript method.&amp;nbsp; Setting args.IsValid to false cancels the form submit and displays the validator error message.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Happy coding,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;James&lt;/FONT&gt;&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>ASP.Net secure (or unsecure) parts of a site using web.config</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=5&amp;t=ASPNet-secure-or-unsecure-parts-of-a" title="ASP.Net secure (or unsecure) parts of a site using web.config" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=5&amp;t=ASPNet-secure-or-unsecure-parts-of-a</id>
    <modified>2008-06-22T09:11:42Z</modified>
    <issued>2007-10-25T09:30:00Z</issued>
    <created>2007-10-25T09:47:39Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Hello,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;To secure my dotnet sites i like to use the built-in authorization module of dotnet using the login control.&amp;nbsp; I usually set the main web.config to allow="*" and deny="?" and by setting the authentication mode="Forms" and supplying a loginUrl="~/Login.aspx" (or some other login page) sends the user to the login page if they havn't already logged in, thus requiring authentication before access the site.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The problem with this is having the web.config sitting in the root of the site and denying all unauthorized users.&amp;nbsp; This now secures *everything* including stylesheets and images etc.&amp;nbsp; To get around this you can specify security exclusions in the web.config file using the location node.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Heres a sample:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#a31515 size=2&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT face="Courier New"&gt;&amp;gt;&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authentication&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;mode&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Forms&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;forms&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;name&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;SiteLogin&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;loginUrl&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;~/Login.aspx&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authentication&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authorization&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;deny&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;users&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;?&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;allow&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;users&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;*&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authorization&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT face="Courier New"&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff size=2&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#a31515 size=2&gt;location&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;path&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;SiteStyle.css&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authorization&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;allow&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;users&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;?&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authorization&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;location&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;FONT color=#a31515 size=2&gt;location&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;path&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;images&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authorization&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;allow&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;users&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;?&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;authorization&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;system.web&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;location&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#a31515 size=2&gt;&amp;lt;configuration&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT face="Courier New"&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face=Tahoma color=#000000 size=2&gt;The above is the web.config which sits in the root of the site.&amp;nbsp; The two location nodes specifies that anonymous users can access the SiteStyle.css file and all files within the images folder!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face=Tahoma color=#000000 size=2&gt;Cheers,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face=Tahoma color=#000000 size=2&gt;James&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</content>
  </entry>
  <entry>
    <title>How to return identity after doing an Insert with ADODB and Classic ASP.</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=4&amp;t=How-to-return-identity-after-doing-an-In" title="How to return identity after doing an Insert with ADODB and Classic ASP." />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=4&amp;t=How-to-return-identity-after-doing-an-In</id>
    <modified>2008-06-22T09:12:20Z</modified>
    <issued>2007-10-09T16:02:00Z</issued>
    <created>2007-10-09T16:17:19Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Hello,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Today i thought i'd share an easy way to return an identity after doing an insert with classic ASP&amp;nbsp;and the ADODB object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Basically we open a connection and perform actions on the open connection, then close when we are finished.&amp;nbsp; By keeping the connection open we are re-using the same session.&amp;nbsp; Following is a code listing.&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV style="PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px; BACKGROUND-COLOR: #ffffcc"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000 size=1&gt;Dim cnn, rsPK, sSql, iTablePK&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000&gt;&lt;FONT size=1&gt;&lt;FONT color=#008000&gt;' Open a connection:&lt;/FONT&gt;&lt;BR&gt;Set cnn = Server.CreateObject("ADODB.Connection")&lt;BR&gt;cnn.Open ConnString&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000&gt;&lt;FONT size=1&gt;&lt;FONT color=#008000&gt;' Perform the insert into our table:&lt;BR&gt;&lt;/FONT&gt;sSql = "INSERT INTO tbOrderDetails (FKOrderID, TourCode) values (1, 'Code')"&lt;BR&gt;cnn.Execute sSql, , adCmdText + adExecuteNoRecords&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000&gt;&lt;FONT size=1&gt;&lt;FONT color=#008000&gt;' Retrieve the identity:&lt;BR&gt;&lt;/FONT&gt;set rsPK = Server.CreateObject("ADODB.Recordset")&lt;BR&gt;rsPK.Open "SELECT @@Identity", cnn,&amp;nbsp; 0, 1, 1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000&gt;&lt;FONT size=1&gt;&lt;FONT color=#008000&gt;' We now have the new record PK in iTablePK!&lt;BR&gt;&lt;/FONT&gt;if (not rsPK.EOF) then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;iTablePK = rsPK(0)&lt;BR&gt;end if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#008000 size=1&gt;' Clean up:&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=1&gt;cnn.close&lt;BR&gt;set cnn = nothing&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;So, we open a connection and while we keep it open we perform the insert into the table with the identity field.&amp;nbsp; We then select the new table field using @@identity.&amp;nbsp; Keep in mind @@identity is GLOBAL to the connection, meaning it will return the latest identity regardless of where the insert occured!!&amp;nbsp; (i.e. table trigger performing an insert).&amp;nbsp; To be safer you could use the SCOPE_IDENTITY() method, which is LOCAL to the table.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Ok, i hope this helps.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Cheers,&lt;BR&gt;James&lt;/FONT&gt;&lt;/P&gt;</content>
  </entry>
  <entry>
    <title>How to return identity after insert using DotNET Sql Data source without using Stored Procedure</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=3&amp;t=How-to-return-identity-after-insert-usin" title="How to return identity after insert using DotNET Sql Data source without using Stored Procedure" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=3&amp;t=How-to-return-identity-after-insert-usin</id>
    <modified>2008-06-22T09:12:39Z</modified>
    <issued>2007-10-01T08:10:00Z</issued>
    <created>2007-10-01T08:28:09Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Here is a little trick i use to return the identity from a PK column after doing an insert with the Sql Data source component.&amp;nbsp; Since this is done at the data source level it can be used with any databound control like the FormView, DetailsView or any other 2-way databound control.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To make this happen just do the following:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Enter your insert command and setup your datasource for inserting.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Append to the end of the insert (this can be done in the Source view of the page) the following:&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;
&lt;P&gt;; select @PK=SCOPE_IDENTITY();&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Now add a new parameter to the&amp;nbsp;&lt;FONT color=#0000ff size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;InsertParameters&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt; node of the SqlDataSource (Change the datatype to match):&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;&lt;FONT face="Times New Roman"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#a31515 size=2&gt;asp&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;:&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Parameter&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Name&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="PK"&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Direction&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Output"&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Type&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;="Int16"&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;/&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;No you can access the new PK value in the 'Inserted' event after the data has been inserted eg:&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;this&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;.Response.Write(e.Command.Parameters[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@PK"&lt;/FONT&gt;&lt;FONT size=2&gt;].Value.ToString());&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;FONT face=Verdana size=2&gt;
&lt;P&gt;&lt;FONT size=2&gt;So what happenes is after the insert the sql sets the new identity to the parameter @PK which is declared on the data source as an output parameter.&amp;nbsp; Then the value can be read after the insert through the Inserted event.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;I hope this helps.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Happy coding.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</content>
  </entry>
  <entry>
    <title>My First Post</title>
    <link rel="alternate" type="text/html" href="http://blog.ataye.com.au/pt/blog/default.aspx?id=1&amp;t=My-First-Post" title="My First Post" />
    <author>
      <name>Default Admin</name>
      <url>http://blog.ataye.com.au/pt/blog</url>
    </author>
    <id>http://blog.ataye.com.au/pt/blog/default.aspx?id=1&amp;t=My-First-Post</id>
    <modified>2008-06-22T09:13:00Z</modified>
    <issued>2007-09-13T14:53:00Z</issued>
    <created>2007-09-13T14:54:30Z</created>
    <content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Hello,&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This is my first post to what hopefully should be the beginning of something special!!&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Cheers,&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;James&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</content>
  </entry>
</feed>