my component (ascx):
This component is part of my page, with him, i open one new page (the next code).
public void LoadSeller(string name, string id)
{
this.txtSeller.Text = name;
this.hdnSellerID.Value = id;
}
my pop up (aspx):
With this code i made some search and select one item on GridView, sending this back to my ascx.
protected void btnSave_Click(object sender, EventArgs e)
{
Components.BasicData basicData= new Components.BasicData();
Button save = (Button)sender;
basicData.LoadSeller("TEST", save.CommandArgument);
}
The post back works, i'm receiving the right data (i checked with my debug). but the txt and hidden are both null (like they are not loaded), they are working without my pop up, but i need mine pop up.
Any ideas ?
PS: My viewState is UP.
I debug my entire code and it stopped at
this.txtSeller.Text = name;
First line of LoadSeller. This said that "this.txtSeller" is null, and i don't know why. i checked my .designer.cs and this.txtSeller is declared. (it also work if i'm not trying load from other page)
Obs: I was wondering if maybe my code is somehow destroying the load (or something like this) on my other page.
Thanks for your help ^.^
EDIT:
My structure is this:
PAGE
Control1
Control2
**Open pop up**
Control3
POP UP
Search
Gridview with buttons
Button in gridview
Goes to my second code "my pop up (aspx):"
Close pop up
in my Control2 i have my first code "my component (ascx):"
Subtitle: Control == userControl
Breadcrumb navigation:
- Solution
- Components(folder)
- BasicData.ascx
- PopUp.aspx
- Components(folder)