<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Tips</title><link>http://waltritscher.com/blog/ramblings/category/16.aspx</link><description>Tips</description><managingEditor>Walt Ritscher</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Walt Ritscher</dc:creator><title>Bug Fix: Disappearing Intellisense in ASP.NET web.config</title><link>http://waltritscher.com/blog/ramblings/archive/2006/08/26/983.aspx</link><pubDate>Sat, 26 Aug 2006 10:53:00 GMT</pubDate><guid>http://waltritscher.com/blog/ramblings/archive/2006/08/26/983.aspx</guid><wfw:comment>http://waltritscher.com/blog/ramblings/comments/983.aspx</wfw:comment><comments>http://waltritscher.com/blog/ramblings/archive/2006/08/26/983.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://waltritscher.com/blog/ramblings/comments/commentRss/983.aspx</wfw:commentRss><trackback:ping>http://waltritscher.com/blog/ramblings/services/trackbacks/983.aspx</trackback:ping><description>&lt;P&gt;I really like the Visual Studio 2005 intellisense (See &lt;A href="http://waltritscher.com/blog/ramblings/archive/2006/08/26/982.aspx"&gt;here&lt;/A&gt;)&amp;nbsp;. There is a bug in the VS however that can stop it from working.&amp;nbsp; I believe it will be fixed in the VS 2005 service pack coming in December but in the meantime here are some things to help fix the problem.&amp;nbsp; Thanks to &lt;A href="http://weblogs.asp.net/scottgu/"&gt;ScottGu&lt;/A&gt; and others for the ideas.&amp;nbsp; I'm posting here so I don't forget.&lt;/P&gt;
&lt;H3&gt;Configuration Element troubles&lt;/H3&gt;
&lt;P&gt;The main thing that causes the intellisense to stop working is adding a xmlsn attribute to the root &amp;lt;config&amp;gt; element.&lt;/P&gt;
&lt;P&gt;From Scott&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;There is one gotcha to be aware of, though, that can sometimes cause intellisense for the web.config file to stop working in the IDE.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This happens when a default namespace is added to the root &amp;lt;configuration&amp;gt; element.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For example, like so:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;configuration&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/.NetConfiguration/v2.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;This doesn&amp;#8217;t cause any runtime problems &amp;#8211; but it does stop intellisense completion happening for the built-in .NET XML elements in the web.config file.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;The bad news is that the built-in web admin tool (launched via the WebSite-&amp;gt;ASP.NET Configuration menu item in VS 2005 and Visual Web Developer) always adds this xmlns namespace when it launches &amp;#8211; so if you use this tool to manage users/roles you&amp;#8217;ll end up having it added to your web.config file for you.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;To get intellisense back when you are editing the web.config file in the IDE, just delete the xmlns reference and have the root configuration element look like so:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;configuration&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;FONT size=2&gt;Everything will then work fine again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;Changing WebAdmin&amp;nbsp; Tool&lt;/H3&gt;
&lt;P&gt;A quick fix to the WebAdmin tool will prevent your config file from getting hammered.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Go to&amp;nbsp;&amp;nbsp;%windir%\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\App_Code&lt;/LI&gt;
&lt;LI&gt;Open the WebAdminPage.cs file&lt;/LI&gt;
&lt;LI&gt;Edit the config.NamespaceDeclared line.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;IMG src="/blog/images/webadminfix1.png"&gt; &lt;/P&gt;
&lt;P&gt;Thanks to &lt;A href="http://blogs.ugidotnet.org/mprota/"&gt;Massimo Prota&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://waltritscher.com/blog/ramblings/aggbug/983.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Walt Ritscher</dc:creator><title>Updated Portland Code Camp 2006 code</title><link>http://waltritscher.com/blog/ramblings/archive/2006/08/02/972.aspx</link><pubDate>Wed, 02 Aug 2006 10:00:00 GMT</pubDate><guid>http://waltritscher.com/blog/ramblings/archive/2006/08/02/972.aspx</guid><wfw:comment>http://waltritscher.com/blog/ramblings/comments/972.aspx</wfw:comment><comments>http://waltritscher.com/blog/ramblings/archive/2006/08/02/972.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://waltritscher.com/blog/ramblings/comments/commentRss/972.aspx</wfw:commentRss><trackback:ping>http://waltritscher.com/blog/ramblings/services/trackbacks/972.aspx</trackback:ping><description>&lt;P&gt;For anyone at the Portland Oregon Code Camp&lt;/P&gt;
&lt;P&gt;I updated my ASP.NET tips code this week and uploaded to my website. Thanks for coming to my talk.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.waltritscher.com/Default.aspx?tabid=57 "&gt;Get the&amp;nbsp;code&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;img src ="http://waltritscher.com/blog/ramblings/aggbug/972.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Walt Ritscher</dc:creator><title>Tip: ASP.NET 2.0 Treeview  - Expanding Nodes when Bound to SiteMap</title><link>http://waltritscher.com/blog/ramblings/archive/2006/05/18/843.aspx</link><pubDate>Thu, 18 May 2006 22:32:00 GMT</pubDate><guid>http://waltritscher.com/blog/ramblings/archive/2006/05/18/843.aspx</guid><wfw:comment>http://waltritscher.com/blog/ramblings/comments/843.aspx</wfw:comment><comments>http://waltritscher.com/blog/ramblings/archive/2006/05/18/843.aspx#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://waltritscher.com/blog/ramblings/comments/commentRss/843.aspx</wfw:commentRss><trackback:ping>http://waltritscher.com/blog/ramblings/services/trackbacks/843.aspx</trackback:ping><description>&lt;P&gt;The&amp;nbsp;new ASP.NET 2.0 TreeView control&amp;nbsp;is pretty handy.&amp;nbsp; It can function as a normal treeview - where you can add/remove treenodes&amp;nbsp;to the nodes collection.&amp;nbsp;It can also serve as a site navigation tree.&amp;nbsp; In this mode each node on the tree becomes a hyperlink to another webpage.&amp;nbsp; The hyperlink gets its Href from the&amp;nbsp;treenodes NavigationUrl property which in turn gets its Url from the web.sitemap file.&lt;/P&gt;
&lt;P&gt;Today I finally solved one of the annoying dilemmas that crops up when using the Treeview.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The problem&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A treenode can be selected or expanded.&amp;nbsp; &lt;STRONG&gt;Selecting&lt;/STRONG&gt; the node causes the SelectedNodeChange event to fire if the Treeview is configured correctly.&amp;nbsp; Clicking the + icon on a node causes the TreeNodeExpanded event to fire.&amp;nbsp; The selected event will not fire if the node is in Navigation mode.&amp;nbsp;&amp;nbsp;&amp;nbsp; This behavior makes sense most of the time.&amp;nbsp; The node is acting &amp;nbsp;as a navigation link&amp;nbsp; -&amp;nbsp;it causes the browser to take you to a new page which means there is no postback.&amp;nbsp; Your are going to a new page, without returning to the server first.&lt;/P&gt;
&lt;P&gt;If the node has its NavigationUrl property set to an empty string, the node is in &lt;STRONG&gt;Selection&lt;/STRONG&gt; mode.&amp;nbsp; If the NavigationUrl is a non-zero length string ,the node is in &lt;STRONG&gt;Navigation&lt;/STRONG&gt; mode.&lt;/P&gt;
&lt;P&gt;For our project I wanted the children nodes to expand whenever the user selects a parent node.&amp;nbsp; Yes, the user can click the + symbol to expand it, &amp;nbsp;but our testing showed that many users expect the node to expand by clicking the node text instead. Since the nodes are in Navigation mode I couldn't&amp;nbsp; put the code in the SelectedNodeChanged event.&lt;/P&gt;
&lt;P&gt;My solution?&amp;nbsp; Use the TreeNodeDatabound event to examine each node as it is being bound to the tree.&amp;nbsp; If the current page URL matches the treenode NavigationUrl I expand all the of the current nodes children.&amp;nbsp; It solves my problem.&amp;nbsp; It still doesn't cause the SelectedNodeChanged to fire so it may not solve all your troubles. At least it's a start.&lt;/P&gt;
&lt;STYLE&gt;
.code {
word-wrap:break-word;
margin:10px;
padding:10px;
border:2px ridge white;
background-color:#eeeeee;
font-family:Courier New;
font-size:10pt;
}
&lt;/STYLE&gt;

&lt;DIV class=code&gt;&amp;nbsp;&lt;FONT color=blue&gt;Protected&amp;nbsp;Sub&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;treeMainMenu_TreeNodeDataBound&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;(&lt;/FONT&gt;&lt;FONT color=blue&gt;ByVal&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;sender&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=blue&gt;As&amp;nbsp;Object&lt;/FONT&gt;&lt;FONT color=black&gt;,&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;&lt;/FONT&gt;&lt;FONT color=blue&gt;ByVal&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;e&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=blue&gt;As&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;System.Web.UI.WebControls.TreeNodeEventArgs)&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;&lt;/FONT&gt;&lt;FONT color=blue&gt;Handles&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;treeMainMenu.TreeNodeDataBound&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=darkgreen&gt;'&amp;nbsp;other&amp;nbsp;binding&amp;nbsp;code&amp;nbsp;here...&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=blue&gt;If&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;Request.Url.PathAndQuery&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=blue&gt;=&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=black&gt;e.Node.NavigateUrl&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=blue&gt;Then&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;&lt;/FONT&gt;&lt;FONT color=black&gt;e.Node.ExpandAll()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=blue&gt;End&amp;nbsp;If&lt;BR&gt;&amp;nbsp;End&amp;nbsp;Sub&lt;/FONT&gt; &lt;/DIV&gt;&lt;img src ="http://waltritscher.com/blog/ramblings/aggbug/843.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Walt Ritscher</dc:creator><title>Tip: ASP.NET 2.0 Login Control Not Redirecting</title><link>http://waltritscher.com/blog/ramblings/archive/2006/05/18/842.aspx</link><pubDate>Thu, 18 May 2006 13:56:00 GMT</pubDate><guid>http://waltritscher.com/blog/ramblings/archive/2006/05/18/842.aspx</guid><wfw:comment>http://waltritscher.com/blog/ramblings/comments/842.aspx</wfw:comment><comments>http://waltritscher.com/blog/ramblings/archive/2006/05/18/842.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://waltritscher.com/blog/ramblings/comments/commentRss/842.aspx</wfw:commentRss><trackback:ping>http://waltritscher.com/blog/ramblings/services/trackbacks/842.aspx</trackback:ping><description>&lt;P&gt;I fixed a bug this morning on our clients ASP.NET 2.0 website.   The site uses the ASP.NET 2.0 Login control.  If the user logged in with one account, logged out and attempted to login again they were not redirected to the destination page.&lt;/P&gt;
&lt;P&gt;I coded the following in the Login control Authenticate event and it appears to solve the problem.&lt;/P&gt;
&lt;STYLE&gt;
.code {
word-wrap:break-word;
margin:10px;
padding:10px;
border:2px ridge white;
background-color:#eeeeee;
font-family:Courier New;
font-size:10pt;
}
&lt;/STYLE&gt;

&lt;DIV class=code&gt; &lt;FONT color=blue&gt;Protected Sub &lt;/FONT&gt;&lt;FONT color=black&gt;Login1_Authenticate _&lt;BR&gt;     (&lt;/FONT&gt;&lt;FONT color=blue&gt;ByVal &lt;/FONT&gt;&lt;FONT color=black&gt;sender &lt;/FONT&gt;&lt;FONT color=blue&gt;As Object&lt;/FONT&gt;&lt;FONT color=black&gt;, _&lt;BR&gt;      &lt;/FONT&gt;&lt;FONT color=blue&gt;ByVal &lt;/FONT&gt;&lt;FONT color=black&gt;e &lt;/FONT&gt;&lt;FONT color=blue&gt;As &lt;/FONT&gt;&lt;FONT color=black&gt;System.Web.UI.WebControls.AuthenticateEventArgs) _&lt;BR&gt;     &lt;/FONT&gt;&lt;FONT color=blue&gt;Handles &lt;/FONT&gt;&lt;FONT color=black&gt;Login1.Authenticate&lt;BR&gt;&lt;BR&gt;   &lt;/FONT&gt;&lt;FONT color=darkgreen&gt;' validation code here...&lt;BR&gt;&lt;BR&gt;    &lt;/FONT&gt;&lt;FONT color=blue&gt;If &lt;/FONT&gt;&lt;FONT color=black&gt;e.Authenticated &lt;/FONT&gt;&lt;FONT color=blue&gt;Then&lt;BR&gt;        If &lt;/FONT&gt;&lt;FONT color=black&gt;Request.QueryString(&lt;/FONT&gt;&lt;FONT color=#808080&gt;"ReturnUrl"&lt;/FONT&gt;&lt;FONT color=black&gt;) IsNot Nothing &lt;/FONT&gt;&lt;FONT color=blue&gt;Then&lt;BR&gt;&lt;BR&gt;            &lt;/FONT&gt;&lt;FONT color=black&gt;FormsAuthentication.RedirectFromLoginPage(Login1.UserName, &lt;/FONT&gt;&lt;FONT color=blue&gt;False&lt;/FONT&gt;&lt;FONT color=black&gt;)&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=blue&gt;Else&lt;BR&gt;            &lt;/FONT&gt;&lt;FONT color=black&gt;FormsAuthentication.SetAuthCookie(Login1.UserName, &lt;/FONT&gt;&lt;FONT color=blue&gt;False&lt;/FONT&gt;&lt;FONT color=black&gt;)&lt;BR&gt;&lt;BR&gt;            &lt;/FONT&gt;&lt;FONT color=darkgreen&gt;' we shouldn't have to do this&lt;BR&gt;            ' but I'm  finding that the page doesn't always redirect&lt;BR&gt;            &lt;/FONT&gt;&lt;FONT color=black&gt;Response.Redirect(Login1.DestinationPageUrl)&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=blue&gt;End If&lt;BR&gt;    End If&lt;BR&gt;      &lt;BR&gt;End Sub&lt;/FONT&gt; &lt;/DIV&gt;&lt;img src ="http://waltritscher.com/blog/ramblings/aggbug/842.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Walt Ritscher</dc:creator><title>Tip: Adding Reflector to Visual Studio</title><link>http://waltritscher.com/blog/ramblings/archive/2006/02/25/811.aspx</link><pubDate>Sat, 25 Feb 2006 17:38:00 GMT</pubDate><guid>http://waltritscher.com/blog/ramblings/archive/2006/02/25/811.aspx</guid><wfw:comment>http://waltritscher.com/blog/ramblings/comments/811.aspx</wfw:comment><comments>http://waltritscher.com/blog/ramblings/archive/2006/02/25/811.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://waltritscher.com/blog/ramblings/comments/commentRss/811.aspx</wfw:commentRss><trackback:ping>http://waltritscher.com/blog/ramblings/services/trackbacks/811.aspx</trackback:ping><description>There are some tools that just seem to find their way into every .NET developer toolbox.&amp;nbsp; Lutz Roeder's &lt;A href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector for .NET&lt;/A&gt; is one of these.&amp;nbsp; I don't know a single working .NET developer that doesn't use Reflector.&amp;nbsp; Some of my friends live inside of it. 
&lt;P&gt;&lt;/P&gt;
&lt;H3&gt;Add to Visual Studio&lt;/H3&gt;
&lt;P&gt;Since Reflector is such a useful tool it would nice to have it at your fingertips when working within Visual Studio.&amp;nbsp; All versions of Visual Studio since VS 4 support adding custom tools.&amp;nbsp; There might have been support earlier, I can't remember anymore.&amp;nbsp; The only tricky part is figuring out how to pass the current assembly from Visual Studio to Reflector.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It's not really hard at all. Visual Studio has built-in arguments that pass data from the IDE to your third party application.&lt;/P&gt;
&lt;P&gt;The following steps work for Visual Studio 2005&amp;nbsp; and Visual Studio 2003.&amp;nbsp; I haven't tested with any other versions.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Click the Tools/External Tools... menu.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/waltritscher/104396409/"&gt;&lt;IMG height=500 alt=ReflectorTools1 src="http://static.flickr.com/38/104396409_b480410823.jpg" width=391&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DL&gt;
&lt;DD&gt;&lt;I&gt;Tools Menu&lt;/I&gt;&lt;/DD&gt;&lt;/DL&gt;
&lt;UL&gt;
&lt;LI&gt;Click the Add button in the External Tools dialog.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/waltritscher/104396411/"&gt;&lt;IMG height=357 alt=ReflectorTools2 src="http://static.flickr.com/41/104396411_d08d2ce721.jpg" width=500&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DL&gt;
&lt;DD&gt;&lt;I&gt;External Tools&lt;/I&gt;&lt;/DD&gt;&lt;/DL&gt;
&lt;UL&gt;
&lt;LI&gt;Add the following to the External Tools dialog.&amp;nbsp; The $(TargetPath) argument will pass your assemblies to Reflector.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A title="Photo Sharing" href="http://www.flickr.com/photos/waltritscher/104396412/"&gt;&lt;IMG height=442 alt=ReflectorTools3 src="http://static.flickr.com/37/104396412_4deb16c7a3.jpg" width=500&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;That's all.&amp;nbsp; Enjoy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://waltritscher.com/blog/ramblings/aggbug/811.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Walt Ritscher</dc:creator><title>Adding a Working Hyperlink to Your 'Windows Form' in .NET</title><link>http://waltritscher.com/blog/ramblings/archive/2005/06/18/460.aspx</link><pubDate>Sat, 18 Jun 2005 18:14:00 GMT</pubDate><guid>http://waltritscher.com/blog/ramblings/archive/2005/06/18/460.aspx</guid><wfw:comment>http://waltritscher.com/blog/ramblings/comments/460.aspx</wfw:comment><comments>http://waltritscher.com/blog/ramblings/archive/2005/06/18/460.aspx#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://waltritscher.com/blog/ramblings/comments/commentRss/460.aspx</wfw:commentRss><trackback:ping>http://waltritscher.com/blog/ramblings/services/trackbacks/460.aspx</trackback:ping><description>&lt;P&gt;It's common in web programming to place links to resources on a page.  The hyperlink tag is on nearly every page on your website.  But what about Windows Forms?&lt;/P&gt;
&lt;P&gt;In .NET it is easy to add a hyperlink to a form.  At least it looks and acts like a hyperlink.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add a LinkLabel to the form.&lt;/LI&gt;
&lt;LI&gt;Change the text to the web address (example &lt;A href="http://www.waltritscher.com/"&gt;http://www.waltritscher.com/&lt;/A&gt; )&lt;/LI&gt;
&lt;LI&gt;In the LinkClicked event add one line of code.&lt;/LI&gt;&lt;/OL&gt;
&lt;TABLE cellPadding=10 width="80%" border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;
&lt;P&gt;    &lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Private Sub&lt;/FONT&gt; LinkLabel1_LinkClicked(&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt; sender As System.Object, &lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt; e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked&lt;BR&gt;        &lt;FONT color=#0000ff&gt;Process&lt;/FONT&gt;.Start(LinkLabel1.Text)&lt;/P&gt;
&lt;P&gt;    &lt;FONT color=#0000ff&gt;End Sub&lt;/FONT&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&lt;P&gt;&lt;/TABLE&gt;
&lt;P&gt;This works because Windows knows that a string with http:// is a web address and will launch the users default web browser.  Process.Start merely asks Windows to launch a process based on the file/URL string being passed as parameter. &lt;/P&gt;&lt;img src ="http://waltritscher.com/blog/ramblings/aggbug/460.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>