This happens if you have a textbox with autopostback set to true. I overcame it by moving the code to the page_load event when postback is true. Instead of using a click event.
protected void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack)
{
// put code here
}
}
instead of :
public void ButtonClick(object sender, EventArgs e)
{
//...
}
No comments:
Post a Comment