| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I have a dropDownList and a LinkButton. The LinkButton's text needs to reflect the selected item in the dropDownList. So, when Subscribe is selected in the dropDownList, the LinkButton's text needs to also be "Subscribe". Also, if the dropDownList's selected item is Unsubscribe, the LinkButton's text needs to be "Unsubscribe". This needs to happen without a page postback or reload. How do I do this? |
|
#2
| |||
| |||
| You can do it client-side in javascript. You will need to view the source for the page, locate the controls in interest in html, and figure out what client events to handle. It may be trivial or not so depending on where on the page the controls are. -- Eliyahu Goldin, Software Developer Microsoft MVP [ASP.NET] http://msmvps.com/blogs/egoldin http://usableasp.net "Andy B" <a_borka@sbcglobal.net> wrote in message news:uIqgPraEJHA.1460@TK2MSFTNGP03.phx.gbl... >I have a dropDownList and a LinkButton. The LinkButton's text needs to >reflect the selected item in the dropDownList. So, when Subscribe is >selected in the dropDownList, the LinkButton's text needs to also be >"Subscribe". Also, if the dropDownList's selected item is Unsubscribe, the >LinkButton's text needs to be "Unsubscribe". This needs to happen without a >page postback or reload. How do I do this? > > > |
|
#3
| |||
| |||
| Cant you use ajax for something like this? "Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@mMvVpPsS.org> wrote in message news:utP5kpbEJHA.616@TK2MSFTNGP06.phx.gbl... > You can do it client-side in javascript. You will need to view the source > for the page, locate the controls in interest in html, and figure out what > client events to handle. It may be trivial or not so depending on where on > the page the controls are. > > -- > Eliyahu Goldin, > Software Developer > Microsoft MVP [ASP.NET] > http://msmvps.com/blogs/egoldin > http://usableasp.net > > > "Andy B" <a_borka@sbcglobal.net> wrote in message > news:uIqgPraEJHA.1460@TK2MSFTNGP03.phx.gbl... >>I have a dropDownList and a LinkButton. The LinkButton's text needs to >>reflect the selected item in the dropDownList. So, when Subscribe is >>selected in the dropDownList, the LinkButton's text needs to also be >>"Subscribe". Also, if the dropDownList's selected item is Unsubscribe, the >>LinkButton's text needs to be "Unsubscribe". This needs to happen without >>a page postback or reload. How do I do this? >> >> >> > > |
|
#4
| |||
| |||
| Sure, it will be much simpler. Put the controls in the same UpdatePanel and handle server-side SelectedIndexChanged event. -- Eliyahu Goldin, Software Developer Microsoft MVP [ASP.NET] http://msmvps.com/blogs/egoldin "Andy B" <a_borka@sbcglobal.net> wrote in message news:uKjCKucEJHA.2072@TK2MSFTNGP04.phx.gbl... > Cant you use ajax for something like this? > > > "Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@mMvVpPsS.org> wrote in > message news:utP5kpbEJHA.616@TK2MSFTNGP06.phx.gbl... >> You can do it client-side in javascript. You will need to view the source >> for the page, locate the controls in interest in html, and figure out >> what client events to handle. It may be trivial or not so depending on >> where on the page the controls are. >> >> -- >> Eliyahu Goldin, >> Software Developer >> Microsoft MVP [ASP.NET] >> http://msmvps.com/blogs/egoldin >> http://usableasp.net >> >> >> "Andy B" <a_borka@sbcglobal.net> wrote in message >> news:uIqgPraEJHA.1460@TK2MSFTNGP03.phx.gbl... >>>I have a dropDownList and a LinkButton. The LinkButton's text needs to >>>reflect the selected item in the dropDownList. So, when Subscribe is >>>selected in the dropDownList, the LinkButton's text needs to also be >>>"Subscribe". Also, if the dropDownList's selected item is Unsubscribe, >>>the LinkButton's text needs to be "Unsubscribe". This needs to happen >>>without a page postback or reload. How do I do this? >>> >>> >>> >> >> > > |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.