<?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>Al Pascual ASP.NET Blog - All Comments</title><link>http://weblogs.asp.net/albertpascual/default.aspx</link><description>My blog at the ASP.NET mother ship, check my personal blog at http://alpascual.com</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>re: How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0</title><link>http://weblogs.asp.net/albertpascual/archive/2008/04/22/how-to-fix-sys-webforms-pagerequestmanagerparsererrorexception-in-ajax-1-0.aspx#7248999</link><pubDate>Sat, 07 Nov 2009 22:12:04 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7248999</guid><dc:creator>pdm2</dc:creator><description>&lt;p&gt;Adding a trigger to the update panel outside the contenttemplate fixed my exel download from a button within the panel!&lt;/p&gt;
&lt;p&gt;Thanks to Jonny Coder!&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://johnnycoder.com/blog/2008/07/25/export-gridview-to-excel-within-an-updatepanel/"&gt;johnnycoder.com/.../export-gridview-to-excel-within-an-updatepanel&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/ContentTemplate&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Triggers&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:PostBackTrigger ControlID=&amp;quot;btnExport&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Triggers&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7248999" width="1" height="1"&gt;</description></item><item><title>re: How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0</title><link>http://weblogs.asp.net/albertpascual/archive/2008/04/22/how-to-fix-sys-webforms-pagerequestmanagerparsererrorexception-in-ajax-1-0.aspx#7248981</link><pubDate>Sat, 07 Nov 2009 21:22:30 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7248981</guid><dc:creator>pdm2</dc:creator><description>&lt;p&gt;Ususally I'm able to convert a SqlDataSource to a DataView to bind to a new Gridview use Response.Write to send the Excel file to the user using StringWriter, triggered by an asp:button. Trying from a button in the UpdatePanel is not working even with enableEventValidation=&amp;quot;false&amp;quot; and I still don't see how to do this after reading this whole thread and posts, that is without trying to decrypting the blob of data AJAX receives from the server.&lt;/p&gt;
&lt;p&gt;Any tricks for me, or do I have to give up and move the button outside the update panel even though I don't want to in the layout?&lt;/p&gt;
&lt;p&gt;~~~~~~~~&lt;/p&gt;
&lt;p&gt;'VB Sub&lt;/p&gt;
&lt;p&gt;Protected Sub btnDownload_Click(ByVal sender As Object, ByVal e As System.EventArgs)&lt;/p&gt;
&lt;p&gt;Dim sbFile as string = Now.ToString(&amp;quot;yyyy-MM-dd&amp;quot;).ToString( + &amp;quot;.xls&amp;quot;))&lt;/p&gt;
&lt;p&gt;Dim dv As DataView = mySqlDataSource.Select(DataSourceSelectArguments.Empty)&lt;/p&gt;
&lt;p&gt;DataViewToExcel(dv, sbFile.ToString)&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;//C# Class void&lt;/p&gt;
&lt;p&gt;public static void DataViewToExcel(DataView dv, string filename)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt;//Convert SqlDataSource to DataView then export to excel for raw data without GridView formatting.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dv.Count &amp;gt; 0)&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;if (dv.Count &amp;lt; 65536)&lt;/p&gt;
&lt;p&gt; &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;//VerifyRenderingInServerForm(gv); &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;HttpContext.Current.Response.Clear();&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;HttpContext.Current.Response.ContentEncoding = Encoding.GetEncoding(&amp;quot;ISO-8859-1&amp;quot;);&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;HttpContext.Current.Response.Charset = &amp;quot;&amp;quot;;&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;HttpContext.Current.Response.AddHeader(&amp;quot;content-disposition&amp;quot;, &amp;quot;attachment;filename=&amp;quot; + filename.ToString());&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;System.IO.StringWriter TextWriter = new System.IO.StringWriter();&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;HttpContext.Current.Response.ContentType = &amp;quot;application/vnd.xls&amp;quot;;&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;System.IO.StringWriter stringwrite = new System.IO.StringWriter();&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;HtmlTextWriter htmlwrite = new HtmlTextWriter(stringwrite);&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;GridView gv = new GridView();&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;gv.DataSource = dv;&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;gv.AllowPaging = false;&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;gv.AllowSorting = false;&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;gv.DataBind();&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;gv.RenderControl(htmlwrite);&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;HttpContext.Current.Response.Write(stringwrite.ToString());&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;HttpContext.Current.Response.End();&lt;/p&gt;
&lt;p&gt; &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;else&lt;/p&gt;
&lt;p&gt; &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;//Msg.Text = &amp;quot;Too many rows - Export to Excel not possible&amp;quot;; &lt;/p&gt;
&lt;p&gt; &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;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7248981" width="1" height="1"&gt;</description></item><item><title>Migrating Graffiti CMS from VistaDB to SQL Server</title><link>http://weblogs.asp.net/albertpascual/archive/2009/05/02/migrating-graffiti-from-vistadb-to-sql-2008.aspx#7239574</link><pubDate>Mon, 26 Oct 2009 11:39:07 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7239574</guid><dc:creator>DamianM</dc:creator><description>&lt;p&gt;I&amp;amp;rsquo;ve been running this site on of Graffiti CMS for a while now. Graffiti seemed like such a good product, it&amp;amp;rsquo;s a shame Telligent seem have to abandoned it without any communication. Anyway, after a long hiatus I started to actually use it&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7239574" width="1" height="1"&gt;</description></item><item><title>re: Adding GeoRSS to GeoTwitter</title><link>http://weblogs.asp.net/albertpascual/archive/2008/04/30/adding-georss-to-geotwitter.aspx#7236415</link><pubDate>Thu, 22 Oct 2009 22:26:57 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7236415</guid><dc:creator>Daddy56</dc:creator><description>&lt;p&gt;But to claim we are completely neutral is perhaps to be na&amp;amp;#239;ve about the human condition. , &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7236415" width="1" height="1"&gt;</description></item><item><title>Baby names meanings are important when choosing a name</title><link>http://weblogs.asp.net/albertpascual/archive/2009/03/02/at-the-microsoft-mvp-summit-2009.aspx#7235929</link><pubDate>Thu, 22 Oct 2009 13:36:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7235929</guid><dc:creator>Baby names meanings are important when choosing a name</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Baby names meanings are important when choosing a name&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7235929" width="1" height="1"&gt;</description></item><item><title>re: How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0</title><link>http://weblogs.asp.net/albertpascual/archive/2008/04/22/how-to-fix-sys-webforms-pagerequestmanagerparsererrorexception-in-ajax-1-0.aspx#7228441</link><pubDate>Tue, 13 Oct 2009 06:07:01 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7228441</guid><dc:creator>r4 nds</dc:creator><description>&lt;p&gt;I tried your solution.....dint worked for me.....any other possibility? &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7228441" width="1" height="1"&gt;</description></item><item><title>re: How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0</title><link>http://weblogs.asp.net/albertpascual/archive/2008/04/22/how-to-fix-sys-webforms-pagerequestmanagerparsererrorexception-in-ajax-1-0.aspx#7225349</link><pubDate>Thu, 08 Oct 2009 09:12:13 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7225349</guid><dc:creator>Chetan</dc:creator><description>&lt;p&gt;when search network is not found then generate this error in browser.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7225349" width="1" height="1"&gt;</description></item><item><title>re: Dealing with Silverlight and SSL and without SSL</title><link>http://weblogs.asp.net/albertpascual/archive/2009/06/03/dealing-with-silverlight-and-ssl-and-without-ssl.aspx#7222080</link><pubDate>Sat, 03 Oct 2009 05:47:24 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7222080</guid><dc:creator>ds r4</dc:creator><description>&lt;p&gt;Thanx for the information. If i want to use SSL for silverlight, does that mean that I would have to need a certification from the server I want to connect.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7222080" width="1" height="1"&gt;</description></item><item><title>re: How to create an Http Handle to re write the URL</title><link>http://weblogs.asp.net/albertpascual/archive/2008/04/22/how-to-create-an-http-handle-to-re-write-the-url.aspx#7219999</link><pubDate>Tue, 29 Sep 2009 15:58:34 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7219999</guid><dc:creator>vinay</dc:creator><description>&lt;p&gt;i want to creat my url address for creat my blog. how to creat i to this.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7219999" width="1" height="1"&gt;</description></item><item><title>Baby name meaning and origin for Pascual</title><link>http://weblogs.asp.net/albertpascual/archive/2009/03/02/at-the-microsoft-mvp-summit-2009.aspx#7217721</link><pubDate>Sun, 27 Sep 2009 03:36:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7217721</guid><dc:creator>Baby name meaning and origin for Pascual</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Baby name meaning and origin for Pascual&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7217721" width="1" height="1"&gt;</description></item></channel></rss>