how to retain the value of the html textbox control when server side dropdownlist changes??
-
hi friends, fine and hope u so... in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist... note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control... can u plz help me to solve this prob????.. i am looking forward to hearing from u... bye..
-
hi friends, fine and hope u so... in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist... note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control... can u plz help me to solve this prob????.. i am looking forward to hearing from u... bye..
dayakar_dn wrote:
note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control...
So, why don't you use it as a server side control?
dayakar_dn wrote:
can u plz help me to solve this prob????..
Another option is to store the value of the textbox somewhere and than again populate it after the postback.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
dayakar_dn wrote:
note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control...
So, why don't you use it as a server side control?
dayakar_dn wrote:
can u plz help me to solve this prob????..
Another option is to store the value of the textbox somewhere and than again populate it after the postback.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
hi friends, fine and hope u so... in my asp.net page i having one server side dropdownlist and html Control textbox.When i am selecting item from dropdownlist,the value in the textbox is cleared why beacuse i used autopostback "true" for dropdownlist item.i want to retain the value of the textbox when i am selecting different items in the dropdownlist... note : i set EnableViewState="true" inthe dropdownlist ...it is only working if i used runat="sever" in the textbox control... can u plz help me to solve this prob????.. i am looking forward to hearing from u... bye..
Use request object to get value of your html textbox and populates the control on every postbacks
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... " Check My Blog