|
-
Apr 15th, 2004, 10:33 AM
#1
Thread Starter
Junior Member
Checkbox runat="server"
I have an ascx control has of DataGrid. My problem is that when I use the render control on the other page it has the error as follows: Checkbox must be placed inside a form tag with runat="server"
The checkbox was created dynamically in VB not in the HTML side. I suspected that this was the cause of the problem. How can I set the checkbox to has attribites <runat="server">?
I have tried the ff code but still it doesn't work:
Dim chk As CheckBox
Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWrite)
chk = New CheckBox()
htmlWrite.Write("<script>runat=server</script>")
chk.Attributes.AddAttributes(htmlWrite)
thanx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|