Probleme sur un bouton qui leve une NullReferenceException
voila j'ai un bouton définit dans la page aspx
Code:
1 2
|
<asp:Button ID="btnListerBureauxDistributeurs" runat="server" Text="Lister les bureaux distributeurs" cssclass="boutonbleutreslong" OnClick="btnListerBureauxDistributeurs_Click" /> |
et dans le code behind
Code:
1 2 3 4 5 6 7 8 9 10 11
| protected void btnListerBureauxDistributeurs_Click(object sender, EventArgs e)
{
try
{
Response.Redirect(Application["cheminSite"].ToString() + "Ecrans/ListeBureauxDistributeurs.aspx", false);
}
catch (Exception ex)
{
Response.Redirect(Application["pageProblemeApplication"].ToString(), false);
}
} |
Probleme : cela me leve une exception NullReferenceException dans le catch
je tiens a preciser que le pageProblemeApplication est bien définit dans le webconfig et que ListeBureauxDistributeurs.Aspx existe dans le dossier Ecrans.
Avez vous une idee d'ou cela peut venir?
Merci par avance