<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://aspadvice.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Learning .NET</title><subtitle type="html">This is a blog about my summer internship at Lake Quincy Media in Kent, Ohio.

I am a Senior in Computer Science at Kent State University.</subtitle><id>http://aspadvice.com/blogs/learning_net/atom.aspx</id><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/default.aspx" /><link rel="self" type="application/atom+xml" href="http://aspadvice.com/blogs/learning_net/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.60809.935">Community Server</generator><updated>2006-06-01T10:44:00Z</updated><entry><title>NavigateUrl, why don't you like my Eval tags?</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx</id><published>2006-12-22T15:58:00Z</published><updated>2006-12-22T15:58:00Z</updated><content type="html">&lt;p&gt;This morning I ran into a particularly annoying problem while working on&amp;nbsp;a page which utilized a repeater. We had created a custom control that was meant to act simply as a button with a NavigateUrl property, and this control was being used inside the&amp;nbsp;repeater in a couple of different&amp;nbsp;places.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;NavigateUrl&amp;nbsp;properties of these&amp;nbsp;buttons needed to be set to&amp;nbsp;evaluate a couple of ID&amp;rsquo;s from the datasource for navigation purposes. However, the&amp;nbsp;typical methods for accomplishing this would not work; on my first attempt it looked something like this:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;LQ&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;LQLinkButton&lt;/font&gt;&lt;font color="#000000" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;rdquo;LQLinkButton1&amp;quot; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Foo Bar&amp;quot;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;NavigateUrl&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;#39;SomePage.aspx?foo=&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;lt;%#Eval(&amp;quot;Foo&amp;quot;) %&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;amp;bar=&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;lt;%#Eval(&amp;quot;Bar&amp;quot;) %&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;#39;/&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000" size="3"&gt;This would not work (as it might for an href or something), because the control seems to think that it&amp;rsquo;s done evaluating the code when it sees the first &amp;ldquo;%&amp;gt;&amp;rdquo; tag. There is a workaround for this; simply use string concatenation and put your entire link inside one code tag, like so:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000" size="3"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;LQ&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;LQLinkButton&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;LQLinkButton2&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Foo Bar&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;NavigateUrl&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;#39;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;%#&amp;quot;SomePage.aspx?foo=&amp;quot; + Eval(&amp;quot;Foo&amp;quot;) + &amp;quot;&amp;amp;bar=&amp;quot; +&amp;nbsp;Eval(&amp;ldquo;Bar&amp;rdquo;) %&amp;gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;#39;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000" size="3"&gt;It&amp;rsquo;s a nice little workaround. Happy Holidays!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000" size="3"&gt;-Zach&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx&amp;amp;;subject=NavigateUrl%2c+why+don%27t+you+like+my+Eval+tags%3f" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx&amp;amp;;title=NavigateUrl%2c+why+don%27t+you+like+my+Eval+tags%3f" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx&amp;amp;title=NavigateUrl%2c+why+don%27t+you+like+my+Eval+tags%3f" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx&amp;amp;;title=NavigateUrl%2c+why+don%27t+you+like+my+Eval+tags%3f" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx&amp;amp;;title=NavigateUrl%2c+why+don%27t+you+like+my+Eval+tags%3f&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/12/22/NavigateUrl_2C00_-why-don_2700_t-you-like-my-Eval-tags_3F00_.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=25741" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>Been a while</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx</id><published>2006-09-08T20:00:00Z</published><updated>2006-09-08T20:00:00Z</updated><content type="html">&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It&amp;rsquo;s been a while since I&amp;rsquo;ve posted anything here. I&amp;rsquo;ve officially started working with Atlas, trying to implement some UpdatePanel controls on some of the under-development LakeQuincy.com pages.&lt;/p&gt;
&lt;p&gt;I must say, Atlas is a really interesting and powerful technology. I&amp;rsquo;m enjoying working with it so far, except for the few minor errors/issues i have run into today. It would seem that placing update panels inside a PasswordRecovery control makes Atlas want to explode&amp;hellip;.&lt;/p&gt;
&lt;p&gt;or maybe it&amp;rsquo;s just something I&amp;rsquo;m doing wrong? I&amp;rsquo;m not really sure as I have tried multiple different configurations for accomplishing my task. It just seems like these controls really don&amp;rsquo;t like eachother. Apparently issues like the ones I am experiencing have been resolved in the June CTP of Atlas, which I am fairly confident we are using.&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;ll be plugging away at that. If anyone has extensive knowledge about these things, send me an email with your Windows Messenger ID and maybe we can chat about it. &lt;/p&gt;
&lt;p&gt;In other news, &lt;a href="http://dawnofwargame.com/"&gt;Warhammer 40,000: Dawn of War&lt;/a&gt; is a really great PC game. Check it out.&lt;/p&gt;
&lt;p&gt;-zach&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx&amp;amp;;subject=Been+a+while" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx&amp;amp;;title=Been+a+while" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx&amp;amp;title=Been+a+while" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx&amp;amp;;title=Been+a+while" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx&amp;amp;;title=Been+a+while&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/09/08/Been-a-while.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=22422" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>AppDev C# Series Review Up Soon!</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx</id><published>2006-08-15T18:07:06Z</published><updated>2006-08-15T18:07:06Z</updated><content type="html">&lt;p&gt;Hey everyone; I&amp;rsquo;ve just completed my review for &lt;a href="http://www.appdev.com/"&gt;AppDev's&lt;/a&gt;&amp;nbsp;series of DVD lessons entitled &lt;a href="http://www.appdev.com/prodfamily.asp?catalog%5Fname=AppDevCatalog&amp;amp;category%5Fname=CS05Product"&gt;Visual C# 2005: Developing Applications&lt;/a&gt;. During my internship here at Lake Quincy, I watched one of these videos a day; I&amp;rsquo;ve just completed watching all of them and have written a review. It has been submitted to &lt;a href="http://aspalliance.com/"&gt;ASP Alliance&lt;/a&gt;&amp;nbsp;for editing and posting; hopefully it should be up in a few days! Keep an eye out.&lt;/p&gt;
&lt;p&gt;And no, I&amp;rsquo;m not trying to steal my co-worker &lt;a href="http://aspadvice.com/user/Profile.aspx?UserID=3032"&gt;Brendan's&lt;/a&gt;&amp;nbsp;thunder&amp;hellip;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx&amp;amp;;subject=AppDev+C%23+Series+Review+Up+Soon!" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx&amp;amp;;title=AppDev+C%23+Series+Review+Up+Soon!" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx&amp;amp;title=AppDev+C%23+Series+Review+Up+Soon!" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx&amp;amp;;title=AppDev+C%23+Series+Review+Up+Soon!" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx&amp;amp;;title=AppDev+C%23+Series+Review+Up+Soon!&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/15/20672.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=20672" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>Data Migration</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx</id><published>2006-08-07T17:57:34Z</published><updated>2006-08-07T17:57:34Z</updated><content type="html">&lt;p&gt;With the launch of the new &lt;a href="http://lakequincy.com/"&gt;Lake Quincy Website&lt;/a&gt;, I&amp;rsquo;ve been busy migrating advertising data from the ASP Alliance databases to the new Lake Quincy database. So far, it&amp;rsquo;s been about a three week process, and it&amp;rsquo;s finally coming to a close today. Currently the program is running for what seems to be the last time (for testing, at least), and everything is looking like it works.&lt;/p&gt;
&lt;p&gt;So, if it completes successfully the next step in the process is to write unit testing to validate that the data was migrated correctly. This is something that I have never done before, and I am sure it will be a valuable thing to know as a developer. A lot of things in the process of real world development are still new to me&amp;hellip;&lt;/p&gt;
&lt;p&gt;Soon, with these databases, all of Lake Quincy&amp;rsquo;s advertisers should have an interface on the Lake Quincy website that allows them to manage their advertising information directly. The interface is currently under development by some other employees here at Lake Quincy.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx&amp;amp;;subject=Data+Migration" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx&amp;amp;;title=Data+Migration" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx&amp;amp;title=Data+Migration" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx&amp;amp;;title=Data+Migration" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx&amp;amp;;title=Data+Migration&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/08/07/20357.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=20357" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>ASP.NET Membership API: Getting the UserId of a user</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx</id><published>2006-07-25T19:04:00Z</published><updated>2006-07-25T19:04:00Z</updated><content type="html">&lt;p&gt;I got this from &lt;a href="http://www.andreas-kraus.net/blog/"&gt;Andreas Kraus's Blog&lt;/a&gt;; I needed to know how to access the UserId of a user in the ASP.NET Membership API; this turned out to work and be very handy:&lt;/p&gt;
&lt;p&gt;“If you use the new comfortable Login Controls of ASP.NET v2, here
is how you resolve the UserID of the currently logged in user:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;        MembershipUser myObject = Membership.GetUser();&lt;br&gt;        string UserID = myObject.ProviderUserKey.ToString();"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s all! Hope that helps..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-zach&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx&amp;amp;;subject=ASP.NET+Membership+API%3a+Getting+the+UserId+of+a+user" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx&amp;amp;;title=ASP.NET+Membership+API%3a+Getting+the+UserId+of+a+user" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx&amp;amp;title=ASP.NET+Membership+API%3a+Getting+the+UserId+of+a+user" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx&amp;amp;;title=ASP.NET+Membership+API%3a+Getting+the+UserId+of+a+user" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx&amp;amp;;title=ASP.NET+Membership+API%3a+Getting+the+UserId+of+a+user&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/25/19927.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=19927" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>Web parts frustration....</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx</id><published>2006-07-11T14:32:51Z</published><updated>2006-07-11T14:32:51Z</updated><content type="html">&lt;p&gt;I&amp;rsquo;ve been trying to write a page for an internal charting/reporting application here at Lake Quincy which uses web parts to display groups of graphs (which are implemented as user controls). The idea is to programmatically create a web part for each report in my database, and close them all on page load so that the page appears blank and every graph is in the web part catalog zone.&lt;/p&gt;
&lt;p&gt;The problem in this process occurs when trying to dynamically create the web parts. The user control has a property for the report id, which is required to be passed along to other classes which grab the data and things like the chart title, legend title, and background image. These are all stored in a Database. So, the report ID&amp;rsquo;s are read in and the graph.reportID needs to be set before creation of the web part. However, it would seem that the webpartmanager.createwebpart() and webpartmanager.addwebpart() methods call the constructor for the user control AGAIN and nuke the value that I have assigned as as report ID.&lt;/p&gt;
&lt;p&gt;So, I took a step back and tried to re-create the user control as a class which inherits from the WebPart class, thus making it a custom web part. However, I&amp;rsquo;m still having the same issue when trying to dynamically create these parts.&lt;/p&gt;
&lt;p&gt;Here is a snippet of what I am trying to do. This is the main loop that is intended to create the web parts dynamically.&lt;/p&gt;
&lt;p&gt;using (SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ArdalisConnectionString"].ConnectionString))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; myConnection.Open();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlCommand myCommand = new SqlCommand("select Id, Name from dw_Report", myConnection);&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; using (SqlDataReader myReader = myCommand.ExecuteReader())&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (myReader.Read())&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SmallChartWebPart myChart = new SmallChartWebPart();&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myChart.ReportId =(Int32)myReader[&amp;rdquo;ID&amp;rdquo;];&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myChart.Title = myReader["Name"] as string;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebPartManager1.AddWebPart(myChart, WebPartZone1, 1);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, I&amp;rsquo;m not sure wether or not i need to use createwebpart() if i am already creating a webpart with&amp;nbsp;&amp;ldquo;new smallchartwebpart()&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s interesting working with&amp;nbsp;Web Parts&amp;hellip;. and pretty frustrating. I would think the .NET team would have&amp;nbsp;provided an easy way to&amp;nbsp;programmatically do things this way; perhaps in future revisions they will. Or perhaps&amp;nbsp;I&amp;rsquo;m just missing something here.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx&amp;amp;;subject=Web+parts+frustration...." target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx&amp;amp;;title=Web+parts+frustration...." target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx&amp;amp;title=Web+parts+frustration...." target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx&amp;amp;;title=Web+parts+frustration...." target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx&amp;amp;;title=Web+parts+frustration....&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/07/11/19487.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=19487" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>Working with Component Art &quot;Rotator&quot;</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx</id><published>2006-06-22T14:31:27Z</published><updated>2006-06-22T14:31:27Z</updated><content type="html">&lt;p&gt;Recently, I have been working on a Dashboard application that displays groups of data reports from various SQL queries on a series of graphs that rotate about every 10 seconds. The graph is used to&amp;nbsp;monitor things like click-through rates, impressions, and user registrations for&amp;nbsp;our &lt;a href="http://aspalliance.com/"&gt;ASP Alliance&lt;/a&gt;&amp;nbsp;and &lt;a href="http://lakequincymedia.com/"&gt;Lake Quincy Media&lt;/a&gt;, all over a given period of time. A seperate application is used to run queries and populate the data, placing them into &amp;ldquo;reports&amp;rdquo;, which are then grouped into report groups, and these report groups are what get displayed on the graph.&lt;/p&gt;
&lt;p&gt;The rotator used in my application is the &lt;a href="http://www.componentart.com/home.aspx"&gt;Component Art&lt;/a&gt;&amp;nbsp;rotator. Yesterday, I wanted to add a drop down list to my page that would allow the user to switch between the report&amp;nbsp;groups stored in the Database on the fly; I basically wanted it to refresh the page and start rotating the new group. Initially, a problem arose in which the group ID value was being lost on page refresh. Thus, when the rotator attempted to Databind, it had a null value and could not continue. Basically, the group ID was getting nuked on postback.&lt;/p&gt;
&lt;p&gt;This issue (with the help of Steven) was resolved by using a &lt;strong&gt;Request.QueryString&lt;/strong&gt; command in conjunction with &lt;strong&gt;Response.Redirect(&lt;font size="2"&gt;ResolveUrl(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;"~/Rotator.aspx?groupId="&lt;/font&gt;&lt;/strong&gt;&lt;font size="2"&gt;&lt;strong&gt; + groupNum))&amp;nbsp; &lt;/strong&gt;(&lt;font size="3"&gt;In the DropDownList1_SelectedIndexChanged event) &lt;/font&gt;&lt;/font&gt;to grab the value again on page load. But there was still a problem; the new graph was being displayed just fine, but the value of the dropdownlist kept reverting back to the original default value (that is, the report group being displayed was not being selected as the default item of the drop down list).&lt;/p&gt;
&lt;p&gt;This was an easier fix than it seemed. I simply added this line of code: &lt;font size="2"&gt;&lt;/p&gt;
&lt;p&gt;DropDownList1.SelectedValue = groupNum.ToString();&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;In my rotator population method (which occurs on page load). This changes the selected item of the drop down list to the proper corresponding group that is currently being displayed on the graph.&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx&amp;amp;;subject=Working+with+Component+Art+%26quot%3bRotator%26quot%3b" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx&amp;amp;;title=Working+with+Component+Art+%26quot%3bRotator%26quot%3b" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx&amp;amp;title=Working+with+Component+Art+%26quot%3bRotator%26quot%3b" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx&amp;amp;;title=Working+with+Component+Art+%26quot%3bRotator%26quot%3b" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx&amp;amp;;title=Working+with+Component+Art+%26quot%3bRotator%26quot%3b&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/22/18889.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18889" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>Learning more MS SQL, and playing with custom config files</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx</id><published>2006-06-13T18:48:50Z</published><updated>2006-06-13T18:48:50Z</updated><content type="html">&lt;p&gt;I&amp;rsquo;ve spent most of today learning more about how SQL works; it&amp;rsquo;s mostly stuff that I already understood the concepts of, but had yet to put to use in MS SQL. I&amp;rsquo;m finding the transition to be very intuitive. So I&amp;rsquo;ve written some queries that have really helped me to explore how joins, indexes, and manipulating datetime based information work.&lt;/p&gt;
&lt;p&gt;Another thing I learned this week (yesterday, actually) was how to create a custom configuration file for a windows console application that I&amp;rsquo;ve been working on. The application is used to populate some of our databases here at Lake Quincy with the information retreived from queries we may be interested in. I learned how to implement a config file that lets me, for example, easily specify which queries I would like to run or the period of time I would like to run them for. This seems like an incredibly powerful tool which I am sure I will utilize in future development process. For someone coming from a background in c, c++ using archaic text editors, this is an incredible feature!&lt;/p&gt;
&lt;p&gt;One thing I need to work on that is actually related to the above topic is to implement a way to specify how much text is output to the screen when the console app runs. Basically, there have to be 3 modes: Silent (show no details on the console screen) , Verbose (show everything) and ErrorOnly (show only error text). I&amp;rsquo;m wondering how to most easily implement this (without putting a bunch of &amp;ldquo;if&amp;rdquo; statements all over the place), and how to&amp;nbsp;capture the &amp;ldquo;error only&amp;rdquo; text and output it. I imagine that last one has something to do with trapping errors using try/catch blocks.&lt;/p&gt;
&lt;p&gt;Tomorrow I will be working on these things. Advice is welcome, as always.&lt;/p&gt;
&lt;p&gt;-Zach&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx&amp;amp;;subject=Learning+more+MS+SQL%2c+and+playing+with+custom+config+files" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx&amp;amp;;title=Learning+more+MS+SQL%2c+and+playing+with+custom+config+files" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx&amp;amp;title=Learning+more+MS+SQL%2c+and+playing+with+custom+config+files" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx&amp;amp;;title=Learning+more+MS+SQL%2c+and+playing+with+custom+config+files" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx&amp;amp;;title=Learning+more+MS+SQL%2c+and+playing+with+custom+config+files&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/13/18646.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18646" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>Working with SQL DateTimes (Increase Performace)</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx</id><published>2006-06-07T18:19:40Z</published><updated>2006-06-07T18:19:40Z</updated><content type="html">&lt;p&gt;Well, I&amp;rsquo;ve found a solution to the problem (with some help from Steven Smith) I was having yesterday. Basically, I just altered my SQL to sandwich the compared date between &amp;gt;= and &amp;lt; operators rather than using the between statement to capture the exact time frame&amp;nbsp;I wanted to retrieve from the database. It was a simple solution, and makes a lot more sense. And example might look like this:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;select&lt;/span&gt;&lt;span&gt; &lt;span&gt;count&lt;/span&gt;&lt;span&gt;(*)/&lt;/span&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;from&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;where&lt;/span&gt;&lt;span&gt;&amp;nbsp;DATE_FROM_TABLE &lt;span&gt;&amp;gt;=&lt;/span&gt; &lt;span&gt;(&lt;/span&gt;dbo&lt;span&gt;.&lt;/span&gt;DateOnly&lt;span&gt;(&lt;/span&gt;@RunDate&lt;span&gt;)-&lt;/span&gt;7&lt;span&gt;)&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;and&lt;/span&gt;&lt;span&gt;&amp;nbsp;DATE_FROM_TABLE &lt;span&gt;&amp;lt;&lt;/span&gt; &lt;span&gt;(&lt;/span&gt;dbo&lt;span&gt;.&lt;/span&gt;DateOnly&lt;span&gt;(&lt;/span&gt;@RunDate&lt;span&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;This will get the average number of items returned for the past week, starting from RunDate.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&lt;span&gt;NOTE: This is also assuming that a function has been defined for&amp;nbsp;&amp;ldquo;DateOnly&amp;rdquo; which strips the time from a datetime value.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx&amp;amp;;subject=Working+with+SQL+DateTimes+(Increase+Performace)" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx&amp;amp;;title=Working+with+SQL+DateTimes+(Increase+Performace)" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx&amp;amp;title=Working+with+SQL+DateTimes+(Increase+Performace)" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx&amp;amp;;title=Working+with+SQL+DateTimes+(Increase+Performace)" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx&amp;amp;;title=Working+with+SQL+DateTimes+(Increase+Performace)&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/07/18498.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18498" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>SQL Query Execution Times</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx</id><published>2006-06-06T18:39:00Z</published><updated>2006-06-06T18:39:00Z</updated><content type="html">Today I was working on writing queries for system that is meant to extract data from a large database and compose that data into reports that will be displayed on a graph.&lt;br&gt;&lt;br&gt;For more than one of my queries, it has been necessary to use some kind of method for stripping the time value out of the datetime variables I am working with (so that only the date is used). Initially, I created a function that does this for me. It uses the following syntax and strips the time from whatever datetime value is read in to @DateWithTime:&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;  DATEADD(d, 0, DATEDIFF(d, 0, @DateWithTime))&lt;br&gt;&lt;br&gt;Unfortunately this method is extremely slow for most of my queries, since each query compares a number of dates and is executed MANY times by the data population utility.&lt;br&gt;&lt;br&gt;Tomorrow I plan to experiment&amp;nbsp; with different methods for stripping the date out of a datetime variable, and seeing if I can increase performance before implementing final versions of my queries. &lt;br&gt;&lt;br&gt;Steven Smith has a blog page on the topic &lt;a HREF="/blogs/ssmith/archive/2006/03/24/15952.aspx"&gt;here&lt;/a&gt;&lt;br&gt;&lt;br&gt;Feel free to discuss.&lt;br&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx&amp;amp;;subject=SQL+Query+Execution+Times" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx&amp;amp;;title=SQL+Query+Execution+Times" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx&amp;amp;title=SQL+Query+Execution+Times" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx&amp;amp;;title=SQL+Query+Execution+Times" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx&amp;amp;;title=SQL+Query+Execution+Times&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/06/18470.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18470" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry><entry><title>First Post</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx" /><id>http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx</id><published>2006-06-01T14:44:00Z</published><updated>2006-06-01T14:44:00Z</updated><content type="html">I've just gotten around to setting up my blog here, and will be using it in the near future to begin posting my experiences in learning the .NET Framework.&lt;br&gt;&lt;br&gt;I'm interning at Lake Quincy Media in Kent, Ohio with Steven Smith, and learning (slowly but surely) how to program in C# and ASP.net using Visual Studio 2005. A lot of this is fairly new to me, so I will make an effort to post what I learn here as things progress.&lt;br&gt;&lt;br&gt;Any and all comments/ advice for a novice .net programmer are welcome.&lt;br&gt;&lt;br&gt;-Zach&lt;br&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx&amp;amp;;subject=First+Post" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx&amp;amp;;title=First+Post" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx&amp;amp;title=First+Post" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx&amp;amp;;title=First+Post" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx&amp;amp;;title=First+Post&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/learning_net/archive/2006/06/01/18237.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18237" width="1" height="1"&gt;</content><author><name>Zbussing</name><uri>http://aspadvice.com/members/Zbussing.aspx</uri></author></entry></feed>