You have to use
if (!Page.IsPostBack)
{
// Your code here
}
in code behind of master page.
Also
What happens if you turn off validating with CausesValidation setting to false?
سؤال
This is the html ,
<asp:LinkButton ID="hlnkLogoffF" runat="server" Text="Logoff" OnClick="hlnkLogoffF_Click" ></asp:LinkButton>
This is the code behind,
protected void hlnkLogoffF_Click(Object sender, EventArgs e)
{
//do something here
}
When i run this, i get the following error,
"The resource cannot be found. "
المحلول
You have to use
if (!Page.IsPostBack)
{
// Your code here
}
in code behind of master page.
Also
What happens if you turn off validating with CausesValidation setting to false?
نصائح أخرى
i tried to run your code
.aspx
<asp:LinkButton ID="hlnkLogoffF" runat="server" Text="Logoff" OnClick="hlnkLogoffF_Click" ></asp:LinkButton>
.Cs
protected void hlnkLogoffF_Click(object sender, EventArgs e)
{
}
i Haven't get any error.Could you please post the code inside the click event.?