<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'Head'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=Head&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'Head'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Web service support for HEAD requests?</title><link>http://forums.asp.net/thread/3272272.aspx</link><pubDate>Thu, 02 Jul 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3272272</guid><dc:creator>c.kellogg</dc:creator><description>&lt;p&gt;I&amp;#39;ve been poking around the web&amp;nbsp;for a couple of hours trying to find an answer to this one.&amp;nbsp; I&amp;#39;m in the process of building a web service for one of our clients.&amp;nbsp; It uses cookieless&amp;nbsp;sessions, so the client needs a&amp;nbsp;way&amp;nbsp;get the redirected URL containing the session id.&amp;nbsp; They would like to do this with a HEAD request.&amp;nbsp;For some reason, I can&amp;#39;t get this to work in my test client.&amp;nbsp; Here&amp;#39;s my code:&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;        Dim req As System.Net.HttpWebRequest = System.Net.WebRequest.Create(&amp;quot;http://localhost/webserv/webserv.asmx/Ping&amp;quot;)
        With req
            .Method = &amp;quot;HEAD&amp;quot;
            .Timeout = 20000
        End With
        Dim res As System.Net.HttpWebResponse = req.GetResponse
        txtAnswer.Text = res.ResponseUri.AbsoluteUri
        res.Close()
&lt;/pre&gt;
&lt;p&gt;Submitting this results in the &amp;quot;(500) Internal Server Error&amp;quot; on the line that calls GetResponse.&amp;nbsp; If I change the Method to &amp;quot;GET&amp;quot;, it works, returning the response url.&amp;nbsp; The Ping method above is an empty Sub so there&amp;#39;s no code in there to fail.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also discovered that if I remove the method from the URL leaving &lt;a href="http://localhost/webserv/webserv.asmx"&gt;http://localhost/webserv/webserv.asmx&lt;/a&gt;, I get the &amp;quot;(405) Method Not Allowed&amp;quot; error.&lt;/p&gt;
&lt;p&gt;Is it possible to perform a HEAD request against a web service?&amp;nbsp; Do I need to do something in the web service or IIS config?&amp;nbsp; This is running on an older machine (IIS 5.0).&amp;nbsp; Any help would be much appreciated.&lt;/p&gt;
&lt;p&gt;ck&lt;/p&gt;</description></item><item><title>Re: How to use &amp;quot;description&amp;quot; meta tag in a website containing masterpages</title><link>http://forums.asp.net/thread/3242772.aspx</link><pubDate>Thu, 18 Jun 2009 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3242772</guid><dc:creator>naspinski</dc:creator><description>&lt;p&gt;I already answered your question (second post on the whole thread) - don&amp;#39;t understand what more you need, it&amp;#39;s really quite simple.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;Have this in your masterpage:&lt;pre class="coloredcode"&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;title&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;head&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span class="tag"&gt;asp:ContentPlaceHolder&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;head&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;and this in each page:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot; ContentPlaceHolderID=&amp;quot;head&amp;quot; Runat=&amp;quot;Server&amp;quot;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;meta&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;description&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; content=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;this is my description&amp;quot;&lt;/span&gt; /&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;asp:Content&lt;/span&gt;&amp;gt;&lt;/pre&gt;&amp;nbsp;&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Dynamically changing the style sheet link.</title><link>http://forums.asp.net/thread/2676943.aspx</link><pubDate>Sat, 11 Oct 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2676943</guid><dc:creator>jahabdank</dc:creator><description>&lt;p&gt;Hello Everybody,&lt;/p&gt;&lt;p&gt;everyone knows that the IE, Opera, Firefox etc. render the CSS differently. This is a very big problem, when the website must look exactly as the customer wants. Therefore what I thought I could do is to change the assigned style sheets accordingly to the browser tht is running at the moment.&lt;/p&gt;&lt;p&gt;I can find out what browser I am running by checking &lt;b&gt;this.Request.Browser.Browser&lt;/b&gt; (there this is the Page object). So what I want to do now is to have two sets of styleshees with exactly the same files/classes inside - for each of the browser type. Example:&lt;/p&gt;&lt;p&gt;~/Css/IE/Main.css&lt;br /&gt;~/Css/Firefox/Main.css &lt;br /&gt;&lt;/p&gt;&lt;p&gt;where each of the files has different definitions of the same classes. What I want to do is to change the link tag in the header of the page accordingly to the current browser :&lt;/p&gt;&lt;p&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;&lt;b&gt;Css/IE/Main.css&lt;/b&gt;&amp;quot; /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;My page.&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt; &lt;/p&gt;&lt;p&gt;The only question is how can I change the &amp;#39;href&amp;#39; property of the &amp;#39;link&amp;#39; tag inside the &amp;#39;head&amp;#39;, from my code behind. Once that can be done, there rest is very simple.&lt;/p&gt;&lt;p&gt;Thanks in advance,&lt;/p&gt;&lt;p&gt;Jozef A. Habdank &lt;br /&gt;&lt;/p&gt;</description></item><item><title>ContentPlaceHolder in MasterPage Header</title><link>http://forums.asp.net/thread/2231691.aspx</link><pubDate>Thu, 13 Mar 2008 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2231691</guid><dc:creator>ShijuKadamala</dc:creator><description>&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;In visual studio 2008, MasterPage has a section ContentPlaceHolder in the header. What is the use of that section?&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Thanks in advance&lt;/font&gt;&lt;/p&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Meta tag closing &amp;quot;/&amp;quot; gets removed when ASP.Net page is rendered.</title><link>http://forums.asp.net/thread/1885497.aspx</link><pubDate>Thu, 30 Aug 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1885497</guid><dc:creator>ManojSharma</dc:creator><description>&lt;p&gt;&lt;font face="verdana,geneva" color="#990000"&gt;Hi&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#990000"&gt;You could add the meta tag programmatically.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#990000"&gt;For example, in the Page_Load event, you could use the following line:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;&lt;strong&gt;// add meta content to the head section of the page.&lt;br /&gt;this.Header.Controls.Add(&lt;br /&gt;&amp;nbsp; new LiteralControl(&amp;quot;&amp;lt;meta name=&amp;#39;description&amp;#39; content=&amp;#39;Official website of the Kennedy family.&amp;#39; /&amp;gt;&amp;quot;));&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#990000"&gt;Happy coding!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#990000"&gt;Regards,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#990000"&gt;MANOJ KUMAR SHARMA.&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Write out RAW Data in the header programmatically</title><link>http://forums.asp.net/thread/1824039.aspx</link><pubDate>Wed, 25 Jul 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1824039</guid><dc:creator>rockinthesixstring</dc:creator><description>&lt;p&gt;Would I use the &amp;quot;AddLiteralText&amp;quot; method? &lt;/p&gt;
&lt;p&gt;and if so, how do i implement it?&lt;/p&gt;
&lt;p&gt;note: found here - &lt;a href="http://www.codeproject.com/aspnet/headfilter.asp?df=100&amp;amp;forumid=228576&amp;amp;exp=0&amp;amp;select=1267704"&gt;http://www.codeproject.com/aspnet/headfilter.asp?df=100&amp;amp;forumid=228576&amp;amp;exp=0&amp;amp;select=1267704&lt;/a&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to: unique HEAD (meta, scripts) on .aspx pages</title><link>http://forums.asp.net/thread/1700743.aspx</link><pubDate>Tue, 08 May 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1700743</guid><dc:creator>himawari</dc:creator><description>&lt;p&gt;As for the scripts, you can include javascript by using the following code in the Page_Load&amp;nbsp;method of your content pages:&lt;/p&gt;&lt;pre class=coloredcode&gt;ClientScript.RegisterClientScriptInclude(&lt;span class=st&gt;"common"&lt;/span&gt;, ResolveUrl(&lt;span class=st&gt;"~/js/common.js"&lt;/span&gt;));&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Re: Meta Tags with ASP.Net?</title><link>http://forums.asp.net/thread/1490511.aspx</link><pubDate>Fri, 08 Dec 2006 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1490511</guid><dc:creator>dustyd</dc:creator><description>&lt;p&gt;There are a couple of ways you can accomplish this...&lt;/p&gt;&lt;p&gt;First, on each page in the Load, you could manually add an HtmlMeta control to the Page's header... &lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;    &lt;span class="kwd"&gt;protected void&lt;/span&gt; Page_Load(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        HtmlMeta meta = &lt;span class="kwd"&gt;new&lt;/span&gt; HtmlMeta();&lt;br /&gt;        meta.Name = &lt;span class="st"&gt;"Description"&lt;/span&gt;;&lt;br /&gt;        meta.Content = &lt;span class="st"&gt;"The description goes here..."&lt;/span&gt;;&lt;br /&gt;        Page.Header.Controls.Add(meta);&lt;br /&gt;    }&lt;/pre&gt;&lt;p&gt;&amp;nbsp;Alternatively, you could place a ContentPlaceHolder in teh HEAD of your master page. Then in each page where you want a custom Description, you could specify an asp:content, and put your meta tag in there..&lt;/p&gt;&lt;p&gt;In the Master Page: &lt;br /&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;&lt;span class="tag"&gt;head&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;span class="tag"&gt;title&lt;/span&gt;&amp;gt;Untitled Page&amp;lt;/&lt;span class="tag"&gt;title&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;span class="tag"&gt;asp:contentplaceholder&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;"headerPlaceHolder"&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;span class="tag"&gt;asp:contentplaceholder&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span class="tag"&gt;head&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;Then, in your content pages (which reference the master page) &lt;br /&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;&lt;span class="tag"&gt;asp:Content&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;"server"&lt;/span&gt;&lt;span class="attr"&gt; ContentPlaceHolderID=&lt;/span&gt;&lt;span class="attrv"&gt;"headerPlaceHolder"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;span class="tag"&gt;meta&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;"Description"&lt;/span&gt;&lt;span class="attr"&gt; content=&lt;/span&gt;&lt;span class="attrv"&gt;"The description goes here..."&lt;/span&gt; /&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span class="tag"&gt;asp:Content&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Hope this helps...&amp;nbsp;&lt;/pre&gt;&amp;nbsp;&amp;nbsp;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1396525.aspx</link><pubDate>Tue, 12 Sep 2006 04:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1396525</guid><dc:creator>LudovicoVan</dc:creator><description>&lt;p&gt;ajw:&lt;/p&gt;&lt;p&gt;&amp;gt; I dont know whether its a good way of doing it but I added a content placeholder in the head tag of the master page which I then linked to in each of my content pages.&lt;/p&gt;&lt;p&gt;IMO, this is a great solution!&lt;/p&gt;&lt;p&gt;&amp;gt; It might not work very well for search engines though because the content doesnt sit in the head tags on the content pages because the head tags are located on the master page.&lt;/p&gt;&lt;p&gt;This problem actually does not exist and your pages are fine. Consider that master and content get merged before being sent back to the browser or crawler, so it just looks like&amp;nbsp;a regular page and the client has not even way to ascertain it is coming from a page implementing a master...&lt;/p&gt;&lt;p&gt;Hope this clearifies. -LV&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>