<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.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>Asp.net with Muhanad YOUNIS - All Comments</title><link>http://weblogs.asp.net/muhanadyounis/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: ScriptManager and MasterPage PageMethods !</title><link>http://weblogs.asp.net/muhanadyounis/archive/2008/12/30/scriptmanager-and-masterpage-pagemethods.aspx#9894966</link><pubDate>Wed, 20 Feb 2013 18:19:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9894966</guid><dc:creator>joe</dc:creator><description>&lt;p&gt;for this to work:&lt;/p&gt;
&lt;p&gt;HtmlGenericControl body = (HtmlGenericControl)Page.Master.FindControl(&amp;quot;masterBody&amp;quot;);&lt;/p&gt;
&lt;p&gt;the body tag must have an ID and the runat=&amp;quot;server&amp;quot; attribute&lt;/p&gt;
&lt;p&gt;&amp;lt;body id=&amp;quot;masterBody&amp;quot; runat=&amp;quot;server&amp;gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9894966" width="1" height="1"&gt;</description></item><item><title>re: ScriptManager and MasterPage PageMethods !</title><link>http://weblogs.asp.net/muhanadyounis/archive/2008/12/30/scriptmanager-and-masterpage-pagemethods.aspx#9894533</link><pubDate>Wed, 20 Feb 2013 15:13:19 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9894533</guid><dc:creator>jay</dc:creator><description>&lt;p&gt;i am fairly sure your positive comments came from you or your friends.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9894533" width="1" height="1"&gt;</description></item><item><title>re: ScriptManager and MasterPage PageMethods !</title><link>http://weblogs.asp.net/muhanadyounis/archive/2008/12/30/scriptmanager-and-masterpage-pagemethods.aspx#9892038</link><pubDate>Tue, 19 Feb 2013 23:09:19 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9892038</guid><dc:creator>john</dc:creator><description>&lt;p&gt;i can&amp;#39;t believe anyone got this to work. &lt;/p&gt;
&lt;p&gt;in my body tag I set the id (&amp;lt;body id=&amp;quot;masterBody&amp;quot;&amp;gt;) but always get and null reference for body variable using this code:&lt;/p&gt;
&lt;p&gt;HtmlGenericControl body = (HtmlGenericControl)Page.Master.FindControl(&amp;quot;masterBody&amp;quot;);&lt;/p&gt;
&lt;p&gt;Also, I believe the public method in the following code is wrong. I think it needs to be a public static string method (SHARED for VB): &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;[WebMethod]&lt;/p&gt;
&lt;p&gt;public string DLMX()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return &amp;quot;abcdef&amp;quot;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9892038" width="1" height="1"&gt;</description></item><item><title>re: Parent – Child in recursive data table with LINQ</title><link>http://weblogs.asp.net/muhanadyounis/archive/2009/11/07/parent-child-in-recursive-data-table-with-linq.aspx#9247438</link><pubDate>Mon, 29 Oct 2012 09:50:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:9247438</guid><dc:creator>crork</dc:creator><description>&lt;p&gt;RQKoSc Im thankful for the post.Much thanks again. Really Great.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9247438" width="1" height="1"&gt;</description></item><item><title>re: ScriptManager and MasterPage PageMethods !</title><link>http://weblogs.asp.net/muhanadyounis/archive/2008/12/30/scriptmanager-and-masterpage-pagemethods.aspx#8738191</link><pubDate>Sun, 15 Jul 2012 02:54:13 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8738191</guid><dc:creator>gary</dc:creator><description>&lt;p&gt;I copy exactly what you have, but don&amp;#39;t get it run.&lt;/p&gt;
&lt;p&gt;Below &amp;nbsp;is my simple coding, please guide me, what&amp;#39;s wrong.&lt;/p&gt;
&lt;p&gt;Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If Not IsPostBack Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim body1 As HtmlGenericControl = DirectCast(Page.Master.FindControl(&amp;quot;masterBody&amp;quot;), HtmlGenericControl)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;body1.Attributes.Add(&amp;quot;onunlond&amp;quot;, &amp;quot;CallService();&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Sub&lt;/p&gt;
&lt;p&gt;the error points to &amp;quot;Callservice();&amp;quot;&lt;/p&gt;
&lt;p&gt;___________________________________________________&lt;/p&gt;
&lt;p&gt;function CallService() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;MasterPageWS.CallFromMasterJS();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;____________________________________________________&lt;/p&gt;
&lt;p&gt;&amp;lt;System.Web.Script.Services.ScriptService()&amp;gt; _&lt;/p&gt;
&lt;p&gt;Public Class MasterPageWS&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Inherits System.Web.Services.WebService&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;WebMethod()&amp;gt; _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Public Sub CallFromMasterJS()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MsgBox(&amp;quot; Check if it&amp;#39;s work.&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Sub&lt;/p&gt;
&lt;p&gt;_________________________________________________&lt;/p&gt;
&lt;p&gt;&amp;lt;body id=&amp;quot;masterBody&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;form runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager&amp;quot; runat=&amp;quot;server&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;EnableScriptGlobalization=&amp;quot;true&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LoadScriptsBeforeUI=&amp;quot;true&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;EnableScriptLocalization=&amp;quot;true&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;EnablePageMethods=&amp;quot;true&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Scripts&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ScriptReference Path=&amp;quot;~/Javascript/MasterPageWSJS.js&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Scripts&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Services&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ServiceReference Path=&amp;quot;~/WebServices/MasterPageWS.asmx&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Services&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:ScriptManager&amp;gt;&lt;/p&gt;
&lt;p&gt;____________________________________________________&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8738191" width="1" height="1"&gt;</description></item><item><title>Looking for example or tips on how to iterate over a table based on results | PHP Developer Resource</title><link>http://weblogs.asp.net/muhanadyounis/archive/2009/11/07/parent-child-in-recursive-data-table-with-linq.aspx#8524907</link><pubDate>Wed, 23 May 2012 16:54:38 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8524907</guid><dc:creator>Looking for example or tips on how to iterate over a table based on results | PHP Developer Resource</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Looking for example or tips on how to iterate over a table based on results | PHP Developer Resource&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8524907" width="1" height="1"&gt;</description></item><item><title>re: How to Count Online Users While Using Session State Server (tutorial)</title><link>http://weblogs.asp.net/muhanadyounis/archive/2010/03/25/how-to-count-online-users-while-using-state-server-tutorial.aspx#8515757</link><pubDate>Mon, 21 May 2012 20:31:25 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8515757</guid><dc:creator>mohi88</dc:creator><description>&lt;p&gt;dear asplearning,&lt;/p&gt;
&lt;p&gt;i think you may do that, but do not forget to use with(nolock) in your sql statement to be sure not to lock the rows while counting. &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8515757" width="1" height="1"&gt;</description></item><item><title>re: How to Count Online Users While Using Session State Server (tutorial)</title><link>http://weblogs.asp.net/muhanadyounis/archive/2010/03/25/how-to-count-online-users-while-using-state-server-tutorial.aspx#8512317</link><pubDate>Mon, 21 May 2012 07:18:11 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8512317</guid><dc:creator>asplearning</dc:creator><description>&lt;p&gt;Thanks for the great article. I am just curious if there is any problems if I just use Count(*) as [UserOnline] from AspStateTempSessions then read it on my page which I display the counter. Thanks. &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8512317" width="1" height="1"&gt;</description></item><item><title>re: How to Count Online Users While Using Session State Server (tutorial)</title><link>http://weblogs.asp.net/muhanadyounis/archive/2010/03/25/how-to-count-online-users-while-using-state-server-tutorial.aspx#8470156</link><pubDate>Sat, 12 May 2012 05:16:08 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8470156</guid><dc:creator>gautam</dc:creator><description>&lt;p&gt;thanks. great work&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8470156" width="1" height="1"&gt;</description></item><item><title>re: Encrypt Web.Config including External appSettings and ConnectionStrings Files.</title><link>http://weblogs.asp.net/muhanadyounis/pages/encrypt-web-config-including-extarnal-appsettings-and-connectionstrings-files.aspx#8271686</link><pubDate>Mon, 30 Jan 2012 01:29:42 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8271686</guid><dc:creator>buy valtrex</dc:creator><description>&lt;p&gt;Good article,it is very remarkable.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8271686" width="1" height="1"&gt;</description></item></channel></rss>