473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Viewstate and dynamic control

Hi,
Dynamically adding Checkbox and GroupRadioButton (extended control
http://www.codeproject.com/aspnet/groupradiobuttons.asp) to placeholder.

In fact, displaying questions and answers.
When my question as only one good answer, I display RadioButton.
In the other hand, checkbox.

Testing my page, I dynamically create controls and checked them if the
answer is good.
So, I got all good answers checked (with checkboxes) and selected (with my
GroupRadiobuttons).
I submit the form ans ONLY checkbox viewstate is saved, every radiobutton
checked value is set to false.

Then, I check AGAIN the good radiobutton and THIS TIME, viewstate works and
I get 100% / 100% good answers !

So, here is the point.
Why does the viewstate is not saving my radiobutton checked value at first
time ?

Thks for help ^^
Nov 19 '05 #1
1 1550
Yehaa....
Think to add the control before setting checked value ^^

"Mick" <sa****@libertysurf.fr> a écrit dans le message de
news:41***********************@news.free.fr...
Hi,
Dynamically adding Checkbox and GroupRadioButton (extended control
http://www.codeproject.com/aspnet/groupradiobuttons.asp) to placeholder.

In fact, displaying questions and answers.
When my question as only one good answer, I display RadioButton.
In the other hand, checkbox.

Testing my page, I dynamically create controls and checked them if the
answer is good.
So, I got all good answers checked (with checkboxes) and selected (with my
GroupRadiobuttons).
I submit the form ans ONLY checkbox viewstate is saved, every radiobutton
checked value is set to false.

Then, I check AGAIN the good radiobutton and THIS TIME, viewstate works and I get 100% / 100% good answers !

So, here is the point.
Why does the viewstate is not saving my radiobutton checked value at first
time ?

Thks for help ^^

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robin Bonin | last post by:
In my user contol I am creating a set of dropdownlists. Each list is created based on input from the other lists. The problem I am having is setting the selected index on the lists. If someone...
3
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event...
7
by: John | last post by:
Hi all, I need finality on this once and for all please. I have a main page which contains a couple of placeholders and within these placeholders, depending on what the user presses, I load...
6
by: John | last post by:
Hi all, I am using dynamic user controls within my web app and these controls are loaded into placeholders via the LoadControl method. My problem is this: I have usercontrolA loaded into a...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
6
by: hlubocky | last post by:
I thought I had a good grasp of the problem related to dynamically creating controls, but it appears that as my application grew in complexity, the problem has resurfaced. As I understand it, in...
6
by: hitendra15 | last post by:
Hi I have created web user control which has Repeater control and Linkbutton in ItemTemplate of repeater control, following is the code for this control On first load it runs fine but when...
1
by: Andrew Robinson | last post by:
I have a <asp:table> control with a large number of dynamically created LinkButtons. I am using the command event, command name and command argument values in my LinkButtons to trigger actions...
12
by: Nick C | last post by:
Hi How can i reduce the viewstate for my asp.net application. It is getting very large now. What is a good solution? thanks N
0
by: Scott Roberts | last post by:
I always thought that the viewstate "keys" included the control ID. As long as the control IDs were unique, there shouldn't be any conflicts. Well, it appears that that may not be the case with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.