Relegence
asked on
DropDownList doesn't generate a PostBack event 'OnSelectedIndexChanged'
Hello,
I am writing a c# asp.net application. I have a page with a DropDownList with AutoPostBack set to 'true'.
There is a case where, on the client side, I reset the DropDownList from another page:
parent.frames[0].document. getElement ById('ddlG roups').se lectedInde x = 0;
after that, I can't select the previous item in the DropDownList anymore - the postback doesn't happen.
Is it because I have changed the index from the client side?
How can I fix that?
Maybe I should reset the DropDownList on the server side. If so, Is it possible to reference a control from a different page?
Thanks
I am writing a c# asp.net application. I have a page with a DropDownList with AutoPostBack set to 'true'.
There is a case where, on the client side, I reset the DropDownList from another page:
parent.frames[0].document.
after that, I can't select the previous item in the DropDownList anymore - the postback doesn't happen.
Is it because I have changed the index from the client side?
How can I fix that?
Maybe I should reset the DropDownList on the server side. If so, Is it possible to reference a control from a different page?
Thanks
ASKER
Can you please give an example of how to reference a control in another page using PreviousPage?
Example:
if (this.PreviousPage != null && this.PreviousPage.IsCrossP agePostBac k)
{
TextBox txt = (TextBox)this.PreviousPage .FindContr ol("TextBo x1");
if (txt != null)
{
this.TextBox1.Text = txt.Text;
}
this.PopupWindow1.Visible = false;
}
Bob
if (this.PreviousPage != null && this.PreviousPage.IsCrossP
{
TextBox txt = (TextBox)this.PreviousPage
if (txt != null)
{
this.TextBox1.Text = txt.Text;
}
this.PopupWindow1.Visible = false;
}
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bob