I may have a hard time articulating my question, so please forgive me.
In my web form page, I have this:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Initialize_DataTable_and_Grid1();
}
Connect_Grid1_to_Boxes();
}
So on the 1st page load, the initialize routine just creates blank rows/data in a GridView and DataTable.
The next method dynamically creates textboxes and binds the GridView. So when the form is rendered on screen,
it just shows a bunch of empty textboxes. So far, so good.
My question is this:
If I then type some code into one of the textboxes and trigger a AutoPostBack,
the initialize method will get passed over but the Connect_Grid1_to_Boxes() method will run again.
What's interesting to me is that it won't replace or overwrite the code I just manually typed into a textbox.
And I'm okay with that, but I just don't understand why!
I sure hope that makes sense!