473,785 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<object> as server side HtmlGenericCont rol

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.H tmlControls.Htm lGenericControl

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 4079
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**********@N OSPAMbytronic.c omwrote in message
news:12******** *****@corp.supe rnews.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.H tmlControls.Htm lGenericControl

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.Re sponse.Write(th eThingIWantToPu tInData)%>"

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

Thanks,

M
"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.comwrote
in message news:%2******** ********@TK2MSF TNGP02.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**********@N OSPAMbytronic.c omwrote in message
news:12******** *****@corp.supe rnews.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.Ht mlGenericContro l

Unfortunatle y 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
2573
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 like applets so the data is retained as the object is only created one time? By design we are not doing a form POST until after many pages. So far, the only solutions seem to be to put everything in a frame and put the object in the outer frame...
0
3115
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, which needs a Quicktime plugin, and one Java applet. He's also kindly supplied me with sample HTML code for each. The code looks like this (simplified):
6
2801
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" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>&lt;object&gt; test</title>
1
1242
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 id="xxx"..>. And How can I use this component in my aspx page? Can I use this component declared by <object> in html view in this aspx behind code? For example ,webform1.aspx in the html view: <html> ....
4
25413
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 following error: Argument '1': cannot convert from 'GenericsPOC.ArticleCollection' to 'System.Collections.Generic.IList<object>' I tried casting specifically to IList<object> but then I get a runtime error: Unable to cast object of type...
2
1970
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 <OBJECT> tag text out to the browser (or not if I don't want to present the Flash movie). Is there another way? Is there an ASP.NET "OBJECT" Web Control?? Alex
4
1859
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" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" runat="server"> <param name="URL" value="mms://srv-enterprise/site_diffusion/( hi want to add a value here !!!!!!!!! )"/> <param name="SendPlayStateChangeEvents" value="True"/> <param...
3
3468
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 frameset are wrong. My users are still using IE 6 and I have a frameset in most of my pages - this is just a one line tickertape thing but it has to stay there. The guy who wrote the site made some errors here (specifying xml strict but...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10325
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.