By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

Hide/Show Controls during a callback

P: n/a
Hi,

Is it possible to Hide/Show controls during a callback? I have a radio
button list that does the callback. When it does the callback I need to
refresh the grid to reflect the selected value in the radio button. Also I
need to hide some check boxes based on the selected value. The checkboxes and
radiobuttons are both server controls. Please let me know.

Thanks,
Apr 11 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Change their Visible property to True or False.

"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:35**********************************@microsof t.com...
Hi,

Is it possible to Hide/Show controls during a callback? I have a radio
button list that does the callback. When it does the callback I need to
refresh the grid to reflect the selected value in the radio button. Also I
need to hide some check boxes based on the selected value. The checkboxes
and
radiobuttons are both server controls. Please let me know.

Thanks,

Apr 11 '07 #2

P: n/a
That won't work because there is no postback occuring where the server can
pick this up.
You need to use client script to set the display attribute of the control
(you can also use the visibility attribute; each has a different effect.)
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Aidy" wrote:
Change their Visible property to True or False.

"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:35**********************************@microsof t.com...
Hi,

Is it possible to Hide/Show controls during a callback? I have a radio
button list that does the callback. When it does the callback I need to
refresh the grid to reflect the selected value in the radio button. Also I
need to hide some check boxes based on the selected value. The checkboxes
and
radiobuttons are both server controls. Please let me know.

Thanks,


Apr 11 '07 #3

P: n/a
Hi,

Thank you for the reply. I have already thought about that. Now I am having
a different problem. I am using ScriptManager and UpdatePanel controls to do
the callbacks. I have a radio button list that does the callback. The
radiobuttonlist has three options. The first option is selected by default.
So when the user gets the page for the first time it uses that option to
display the data. when I switch to another option it is doing the callback
and everything is working fine. However if I select the first option(which is
default) it is not doing the callback. I am assuming that since it didn't
update the viewstate during the callback the asp.net framework is thinking
that the selectedindex didn't change for the radiobutton list. That is why
it is not doing callback. When I searched online they sugested to call
WebForm_InitCallback() manually. But I am not knowing where to include that
code since the ScriptManager automatically inserts the necessary javascript
code for the callbacks. Please let me know.

Thanks,
"Peter Bromberg [C# MVP]" wrote:
That won't work because there is no postback occuring where the server can
pick this up.
You need to use client script to set the display attribute of the control
(you can also use the visibility attribute; each has a different effect.)
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Aidy" wrote:
Change their Visible property to True or False.

"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:35**********************************@microsof t.com...
Hi,
>
Is it possible to Hide/Show controls during a callback? I have a radio
button list that does the callback. When it does the callback I need to
refresh the grid to reflect the selected value in the radio button. Also I
need to hide some check boxes based on the selected value. The checkboxes
and
radiobuttons are both server controls. Please let me know.
>
Thanks,
Apr 11 '07 #4

P: n/a
Are there solution about it ??
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net

"Sridhar" wrote:
Hi,

Thank you for the reply. I have already thought about that. Now I am having
a different problem. I am using ScriptManager and UpdatePanel controls to do
the callbacks. I have a radio button list that does the callback. The
radiobuttonlist has three options. The first option is selected by default.
So when the user gets the page for the first time it uses that option to
display the data. when I switch to another option it is doing the callback
and everything is working fine. However if I select the first option(which is
default) it is not doing the callback. I am assuming that since it didn't
update the viewstate during the callback the asp.net framework is thinking
that the selectedindex didn't change for the radiobutton list. That is why
it is not doing callback. When I searched online they sugested to call
WebForm_InitCallback() manually. But I am not knowing where to include that
code since the ScriptManager automatically inserts the necessary javascript
code for the callbacks. Please let me know.

Thanks,
"Peter Bromberg [C# MVP]" wrote:
That won't work because there is no postback occuring where the server can
pick this up.
You need to use client script to set the display attribute of the control
(you can also use the visibility attribute; each has a different effect.)
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Aidy" wrote:
Change their Visible property to True or False.
>
"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:35**********************************@microsof t.com...
Hi,

Is it possible to Hide/Show controls during a callback? I have a radio
button list that does the callback. When it does the callback I need to
refresh the grid to reflect the selected value in the radio button. Also I
need to hide some check boxes based on the selected value. The checkboxes
and
radiobuttons are both server controls. Please let me know.

Thanks,
>
>
>
Apr 24 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.