<?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>Travis Collins  - All Comments</title><link>http://weblogs.asp.net/traviscollins/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>re: AJAX Timeout Server Control</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/22/ajax-timeout-server-control.aspx#6577068</link><pubDate>Fri, 29 Aug 2008 21:02:56 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6577068</guid><dc:creator>Latish Sehgal</dc:creator><description>&lt;p&gt;To make this control work with asynchronous postbacks, you need to add the below code&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;initialize : function() &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &lt;/p&gt;
&lt;p&gt;		....&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sys.Application.add_load(Function.createDelegate(this, this._handlePageLoaded));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.....&lt;/p&gt;
&lt;p&gt;	},&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp; &amp;nbsp;_handlePageLoaded: function(sender, e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this._resetTimeout();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;},&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6577068" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#6562419</link><pubDate>Mon, 25 Aug 2008 06:06:05 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6562419</guid><dc:creator>ламинат</dc:creator><description>&lt;p&gt;0oThank's for greate post.1n I compleatly agree with last post. &amp;nbsp;fmj &lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://skuper.ru&amp;quot;&amp;gt;купить"&gt;http://skuper.ru&amp;quot;&amp;gt;купить&lt;/a&gt; ламинат&amp;lt;/a&amp;gt; 3y&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6562419" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#6499551</link><pubDate>Sat, 09 Aug 2008 21:54:03 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6499551</guid><dc:creator>nic</dc:creator><description>&lt;p&gt;hi &lt;/p&gt;
&lt;p&gt;this code is for c#,can you show haw work in vb.thank`s&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6499551" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#6399156</link><pubDate>Mon, 14 Jul 2008 06:56:14 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6399156</guid><dc:creator>bhaarat</dc:creator><description>&lt;p&gt;Ok Thanks I got How to do with My database....&lt;/p&gt;
&lt;p&gt;I have done it as&lt;/p&gt;
&lt;p&gt; &amp;nbsp; public int CheckUserAvailability()&lt;/p&gt;
&lt;p&gt; &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;MainClass ObjMainCls = new MainClass();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlCommand Cmd = new SqlCommand(&amp;quot;Portal_CkeckUseravail&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cmd.CommandType = CommandType.StoredProcedure;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cmd.Parameters.Add(&amp;quot;@Uname&amp;quot;, SqlDbType.NVarChar,50).Value = this.Name;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlDataReader Reader = null;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlParameter parameterUserVal = new SqlParameter(&amp;quot;@Avail&amp;quot;, SqlDbType.Int);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parameterUserVal.Direction = ParameterDirection.Output;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cmd.Parameters.Add(parameterUserVal);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int i = ObjMainCls.ExecuteNonQuery(Cmd);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (int)parameterUserVal.Value;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6399156" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#6399066</link><pubDate>Mon, 14 Jul 2008 06:10:54 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6399066</guid><dc:creator>bhaarat</dc:creator><description>&lt;p&gt;hi &lt;/p&gt;
&lt;p&gt;how can i use my database for it...&lt;/p&gt;
&lt;p&gt;Very nice job...&lt;/p&gt;
&lt;p&gt;Keep it on...&lt;/p&gt;
&lt;p&gt;Thanx a lot&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6399066" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#6366752</link><pubDate>Sun, 06 Jul 2008 14:15:51 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6366752</guid><dc:creator>bravia</dc:creator><description>&lt;p&gt;@macupryk&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager1&amp;quot; runat=&amp;quot;server&amp;quot; EnablePageMethods=&amp;quot;True&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6366752" width="1" height="1"&gt;</description></item><item><title>re: AJAX Timeout Server Control</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/22/ajax-timeout-server-control.aspx#6360731</link><pubDate>Sat, 05 Jul 2008 01:48:10 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6360731</guid><dc:creator>Justin</dc:creator><description>&lt;p&gt;Hey Travis, just wanted to say thanks for the terrific control; it saved me a ton of time and I learned a lot by working with it. &amp;nbsp;Have you considered trying to get it incorporated with the Ajax Control Toolkit on CodePlex (&lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/AjaxControlToolkit"&gt;www.codeplex.com/AjaxControlToolkit&lt;/a&gt;)?&lt;/p&gt;
&lt;p&gt;I did find I needed to add some code for it to work properly on pages that utilize UpdatePanels. &amp;nbsp;Without the following code, refreshes of the update panel don&amp;#39;t actually reset the timeout, so users can timeout even if they&amp;#39;re posting back to the server frequently on the same page.&lt;/p&gt;
&lt;p&gt;&amp;lt;script language=&amp;quot;javascript&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;function ResetTimerHandler(sender, args) &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (args.get_error() == undefined)&lt;/p&gt;
&lt;p&gt; &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;var timeoutControl = $get(&amp;#39;&amp;lt;%= TimeoutControl.ClientID %&amp;gt;&amp;#39;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (timeoutControl != null)&lt;/p&gt;
&lt;p&gt; &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;timeoutControl.control._resetTimeout();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;function load() &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var prm = Sys.WebForms.PageRequestManager.getInstance();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (prm)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prm.add_endRequest(ResetTimerHandler);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;body onload=&amp;quot;load();&amp;quot;&amp;gt; &lt;/p&gt;
&lt;p&gt;I included the code above on the master page with the TimeoutControl and it works like a charm. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Justin&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6360731" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#6201058</link><pubDate>Mon, 19 May 2008 05:18:52 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6201058</guid><dc:creator>macupryk</dc:creator><description>&lt;p&gt; function checkUsernameUsage(username) &lt;/p&gt;
&lt;p&gt; &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;// initiate the ajax pagemethod call&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// upon completion, the OnSucceded callback will be executed&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PageMethods.IsUserAvailable(username, OnSucceeded);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;PageMethods is undefined?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6201058" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#5947441</link><pubDate>Tue, 11 Mar 2008 01:38:54 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5947441</guid><dc:creator>travistx</dc:creator><description>&lt;p&gt;I have posted a sample project here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/blogs/traviscollins/Examples/CheckUsernameWithAJAX.zip"&gt;weblogs.asp.net/.../CheckUsernameWithAJAX.zip&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5947441" width="1" height="1"&gt;</description></item><item><title>re: Check Username Availability with ASP.NET AJAX</title><link>http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx#5947369</link><pubDate>Tue, 11 Mar 2008 01:18:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5947369</guid><dc:creator>travistx</dc:creator><description>&lt;p&gt;Alexei, no you shouldn't be getting a postback. &amp;nbsp;I'll make an example project and post it on here.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5947369" width="1" height="1"&gt;</description></item></channel></rss>