Andrew8886 says:
<asp:ControlParameter Name=
"Codice"
ControlID=
"FiltroCodice"
Type=
"string"
DefaultValue=
""
ConvertEmptyStringToNull=
"true"
/>
Textbox from Header you cannot assign to value for the ControlParameter of SqlDataSource as Gridview Header textbox value will not get to SqlDataSource Parameter as it in Gridview if it was simple textbox or any other control then it may work fine. You can do one think add hidden field values which will retain the QueryString values as well as it will use to pass the parameter value to SqlDataSource. Do modification in your code it will work fine also it will maintain the QueryString value in Header textbox if you searched before.
Add Hidden Fields in Page
<asp:HiddenField ID="FiltroCodice" runat="server" />
<asp:HiddenField ID="FiltroDescrizione" runat="server" />
<asp:HiddenField ID="FiltroNumeroColli" runat="server" />
<asp:HiddenField ID="FiltroNote" runat="server" />
Change your Page Load Event
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (ElencoArticoli.Rows.Count > 0)
{
FiltroCodice.Value = Request.QueryString["Codice"];
FiltroDescrizione.Value = Request.QueryString["Descrizione"];
FiltroNumeroColli.Value = Request.QueryString["NumeroColli"];
FiltroNote.Value = Request.QueryString["Note"];
ElencoArticoli.DataBind();
((TextBox)ElencoArticoli.HeaderRow.FindControl("FiltroCodice")).Text = FiltroCodice.Value;
((TextBox)ElencoArticoli.HeaderRow.FindControl("FiltroDescrizione")).Text = FiltroDescrizione.Value;
((TextBox)ElencoArticoli.HeaderRow.FindControl("FiltroNumeroColli")).Text = FiltroNumeroColli.Value;
((TextBox)ElencoArticoli.HeaderRow.FindControl("FiltroNote")).Text = FiltroNote.Value;
}
}
}