How to get dropdownlist selected value in Page_Init event
-
Hi all, I am trying to read the dropdown selected value in Page_Init Event, but i couldn't. I have to dynamically add controls to form based on dropdown selected value.
please suggest me how to read dropdown selected value in Page_Init.
thanks in advance.
-
Hi all, I am trying to read the dropdown selected value in Page_Init Event, but i couldn't. I have to dynamically add controls to form based on dropdown selected value.
please suggest me how to read dropdown selected value in Page_Init.
thanks in advance.
In normal scenario, you cannot read the any entered value from client side in your Page_Init event. (If you wish, you can read the posted form manually and get to know about the dropdown selected value) In Asp.Net, your control gets populated with value after Page_Init event and before Page_Load event. So, your values will be available at Page_Load and later events. I will suggest, things would be easier if you push the logic to Page_Load event or later.
Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.
-
In normal scenario, you cannot read the any entered value from client side in your Page_Init event. (If you wish, you can read the posted form manually and get to know about the dropdown selected value) In Asp.Net, your control gets populated with value after Page_Init event and before Page_Load event. So, your values will be available at Page_Load and later events. I will suggest, things would be easier if you push the logic to Page_Load event or later.
Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.
Thanks Gandhi, thanks for your suggestion