problem with .netframework sp1

S

Saber

I have a web application and we had nice days, I don't know why I installed
..netframework sp1 and then a strange error happend:

Control 'rdPoll_0' of type 'RadioButton' must be placed inside a form tag
with runat=server.

Actually, there is no rdPoll_0 in application, but there is rdPoll:
Protected WithEvents rdPoll As System.Web.UI.WebControls.RadioButtonList
 
G

Greg Burns

When ASPNET renders the server controls to html it is probably assigning
unique clientside IDs. Hence the rdPoll_0.

Is rdPoll inside your form tag? :)

Post your .aspx page.

Greg
 
G

Guest

Hi Saber,

That "phantom" id: "rdPoll_0" is the "ClientID" property of your "rdPoll"
radioButton control. All controls get rendered with a client-side id whether
or not you define one in your code; in this case you did, so it got assigned
as # 0. If the radiobutton was a repeating item in your datagrid, you'd see
the number at the end of the id increment by one for each instance of the
radiobutton repeating.

As far as the error-- is the radiobutton already inside a pair of form tags?
If not, the solution is pretty clear, just move the opening form tag above
your first server control &/or move the closing form tag below the last
server control in your page.

THe list of issues that SP1 fixes contains at least 5 separate items related
to the datagrid. Maybe SP1 has fixed an error that was allowing your (for
lack of a better term) "illegal" radiobutton. Now that SP1 has implemented
a fix, the datagrid is correctly telling you what's wrong with the code. ??

Here's the list of all fixes that Sp1 addresses: YOu can find all the
datagrid changes within the list: http://support.microsoft.com/?kbid=867460

For more info on the ClientID property see:
http://msdn.microsoft.com/library/d...frlrfSystemWebUIControlClassClientIDTopic.asp
 
S

Saber

Thanks,
You're right.
I don't know who wrote </form> in middle of my aspx page and before radio
button! ;-)
 
S

Saber

Hi Chris,
Thanks for info.
no, there were no relation between datagrid and radio button.
but I don't know why a closing form tag (</form>) added in middle of code,
and I don't know why I posted a message before looking again in aspx file!
anyhow, it is solved now :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top