When posted back the 'original' page will be build and displayed.
So when you recieve a postback make sure to make the control there as well.
The first time looks like it works because there you build the control in.
With the next postback that control isnot there anymore, create it and then
it will work.
Hope this helps.
Simple example:
2 buttons on a page.
By clicking Button1 a label is created.
Now click Button2.......label is disappeared, right?
So, re create the label in Page_Load when it is a postback and it is needed
(e.g. Button1 was clicked)
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{}
protected void Button1_Click(object sender, EventArgs e)
{
Label lbl = new Label();
lbl.Text = "New control";
Controls.Add(lbl);
}
protected void Button2_Click(object sender, EventArgs e)
{}
}
>> What do you mean by 'run it again'??
>>
> I meant postback sorry for confusion.