473,405 Members | 2,167 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,405 software developers and data experts.

<object> as server side HtmlGenericControl

Hi,

I want to have an <objecttag in my .aspx file, so that it is shown as part
of my webpage. I want to add data to the "data" attribute using server side
code, so I thought I would add the runat="server" attribute. In order for
ASP.net to treat this as a generic html control, I have declared it in my
..aspx.vb codebehind file as

Protected WithEvents myObjectTag As
System.Web.UI.HtmlControls.HtmlGenericControl

Unfortunatley I get the following error when I run the code

Parser Error

Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: An object tag must contain a Class, ClassID or ProgID
attribute.

Does anyone have any idea how to prevent this happening?

Thanks,
Martin
Aug 30 '06 #1
2 4045
the <objecttag just like the <scripttag is a special server control if
runat server is specified. if you include runat=server on an object tag, its
expected to be com objected created on the serverside that the code behind
can access, not a client control.

-- bruce (sqlwork.com)

"Martin Eyles" <ma**********@NOSPAMbytronic.comwrote in message
news:12*************@corp.supernews.com...
Hi,

I want to have an <objecttag in my .aspx file, so that it is shown as
part of my webpage. I want to add data to the "data" attribute using
server side code, so I thought I would add the runat="server" attribute.
In order for ASP.net to treat this as a generic html control, I have
declared it in my .aspx.vb codebehind file as

Protected WithEvents myObjectTag As
System.Web.UI.HtmlControls.HtmlGenericControl

Unfortunatley I get the following error when I run the code

Parser Error

Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: An object tag must contain a Class, ClassID or
ProgID attribute.

Does anyone have any idea how to prevent this happening?

Thanks,
Martin

Aug 30 '06 #2
Got a solution that works

data="<%Page.Response.Write(theThingIWantToPutInDa ta)%>"

so my object doesn't have to be server side.

Thanks,

M
"bruce barker (sqlwork.com)" <b_*************************@sqlwork.comwrote
in message news:%2****************@TK2MSFTNGP02.phx.gbl...
the <objecttag just like the <scripttag is a special server control if
runat server is specified. if you include runat=server on an object tag,
its expected to be com objected created on the serverside that the code
behind can access, not a client control.

-- bruce (sqlwork.com)

"Martin Eyles" <ma**********@NOSPAMbytronic.comwrote in message
news:12*************@corp.supernews.com...
>Hi,

I want to have an <objecttag in my .aspx file, so that it is shown as
part of my webpage. I want to add data to the "data" attribute using
server side code, so I thought I would add the runat="server" attribute.
In order for ASP.net to treat this as a generic html control, I have
declared it in my .aspx.vb codebehind file as

Protected WithEvents myObjectTag As
System.Web.UI.HtmlControls.HtmlGenericControl

Unfortunatley I get the following error when I run the code

Parser Error

Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: An object tag must contain a Class, ClassID or
ProgID attribute.

Does anyone have any idea how to prevent this happening?

Thanks,
Martin


Sep 4 '06 #3

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

Similar topics

1
by: Tim Jowers | last post by:
We are using an object from a vendor into which we write data from several web pages. So far IE always seems to create a new copy of the object for each web page. Is there a way to make it behave...
0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
6
by: Christopher Benson-Manica | last post by:
(I posted this as a reply to my thread about iframes, but I think it may get mostly ignored there.) http://ataru.gomen.org/files/test.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
1
by: Jet Leung | last post by:
Hi all, There are somethings trouble me. I had made a aspx file and drop an ActiveX component into this aspx design view, and this aspx html view, this ActiveX component was declared <object...
4
by: KC | last post by:
Could some one explain to me the casting rules for sending generic lists, ex. List<Person>, to a function that accepts List<object>? I cannot get the following easy-cheesy app to work. I get the...
2
by: Alex Maghen | last post by:
I want to insert (or not insert) a Macromedia Flash object on my ASP.NET .ASPX page. What is the most elegant way of doing this? I know that I could use an <ASP:Literal> control and just spit the...
4
by: msnews.microsoft.com | last post by:
hello every one i am using media player in internet explorer but i cannot access it directly in code behind, so do you know a way to access it? <object id="video123"...
3
by: mark4asp | last post by:
According to this <http://css-discuss.incutio.com/?page=BoxModelHack> IE6 will display differently to the W3C standard. Only IE6/strict and I suppose IE 7 display correctly. IE 6 transitional and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.