Monday, April 7, 2008

Can You Have A Beer When Taking Colloidal Silver?

Asp.Net file downloads Import Excel files, uncover the structure and sheet names

Ajax gives great advantages in terms of navigability, interactivity and user experience to your web application.
One factor that is often overlooked is the reduction of traffic generated from the pages, since only a small part of the page is sent from server to browser. In practice avoids the need to send every time an entire document, but only a part.
Response.ContentType = "application / vnd.ms-excel"
Response.AddHeader ("Content-Disposition", "attachment; filename = Report.xls ") response.write
...
Response.End

When you press the button the broser return an error message quite clear:

Sys.WebForms.PageRequestManagerParserErrorException: The Message Received from the server Could not be parsed. Common Causes for this error are When the response is modified by calls to response.write (), response filters, HttpModules,
or server trace is enabled.
We are sending to the browser something inappropriate to the context.
Fortunately around this problem is quite simple:
trigger of our recording in a new UpdatePanel PostBackTrigger related to our download button

\u0026lt;asp:updatepanel id="UpdatePanel1" runat="server">
<triggers>
<asp:postbacktrigger controlid="ControlID">
</triggers>
Se invece il vostro controllo fosse generato a runtime, (es: un bottone inserito in GridView) sarà necessario effettuare al registrazione a runtime, dopo che il controllo è stato generato:


ScriptManager.GetCurrent(Page).RegisterPostBackControl(ImageButton1)


Friday, April 4, 2008

George Foreman Gas Grill

Asp.Net Ajax File Download

Capita spesso di avere la necessità di estrarre dal database un elenco formato dalla concatenazione delle righe risultanti una query.

Per esempio gli accessori di un veicolo, le sottocategorie di una macrocategoria,ecc.

AS DECLARE @ property varchar (2000) select @
property = COALESCE (@ property,'') + description_it + ',' WHERE
from vwCATPROP idcategory
= 1 select @ property as property
And here's the result:






Thursday, April 3, 2008

Blueprints To Build A Computer Desk

Sql server, concatenate a row in a SQL NULL columns

If you happen to create a stored procedure that returns a column concatenating several column base, I would be also noticed that when one of the "parts" of the concatenation is NULL, the result is NULL. Enough obvious, but quite boring like behavior.
To change the behavior of the chain you can use this option declaration


Done! Sometimes it's easy ...