473,795 Members | 2,882 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 4080
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
3116
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
9673
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
9044
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...
1
7543
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
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
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
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.