473,699 Members | 3,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS.NET 2005, IE, UserControls

I have exhaustively researched this topic for several days now and
haven't made any headway. Microsoft documentation seems to be
EXCEEDINLY poor regarding this topic, and that is regarding using
JScript to interact with a control/assembly embedded into an Internet
Explorer page.

I have created a class library project which contains a single class
that descends from ListBox. When I embed the object like

<object id="List1" name="List1" width="500" height="200"
classid="http:c ontrols.dll#MyL istBox" VIEWASTEXT></object>

it certainly loads. I see the ListBox. I have even played with
controls like a Label from which I expose a property that allows me to
be able to change the label text and I seem to be able to adjust this
property through the <param> tag. I just can't seem to interact with
it through JScript. Every time I try to access a method, it gives me a
"Object doesn't support this property or method" either way I try it.

document.getEle mentByID("List1 ").AddItem("XXX XXX");
List1.AddItem(" YYYYYY");
I have fooled around with permissions till I am blue in the face. I
don't think that is the problem. The control loads. It seems to me
that IE doesn't seem to be able to use reflection or whatever mechanism
it uses to figure what propertys and methods are available.

Any help? I can't believe it is this difficult. .NET was supposed to
make my life EASIER!

Feb 10 '06 #1
2 1119
Further information.

I downloaded the code from this article
http://msdn.microsoft.com/msdnmag/issues/02/06/rich/, and stuck his
controls.dll and controls.html into the web site I was using for my own
tests. No other changes. His code works. That would seem to indicate
to me that his DLL has been compiled differently.

Feb 10 '06 #2
It's always amazing. The minute you ask for help ...

I recompiled the source code from the article, converting from 2003 to
2005. The DLL went from 4K to 16K, but it still works in the HTML
page. So, it doesn't appear to be anything with VS.NET 2005.

I then started looking for differences between his class and a class
that I just created that descended from Label, which didn't work ....
and I found it. Right click on the project properties. Click on the
application section. Click on the assembly information button. Make
sure the "Make assembly COM-Visible" is checked.

It works. I will have to investigate this, since from what I read,
..NET assemblies didn't follow the old ActiveX type configuration.

Feb 10 '06 #3

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

Similar topics

4
1643
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is webprojetcs wich need to shere some common userControls. Optimally i want a class libarary project wich contains the controls so i could import the DLL and use the controls. But that of course doesnt work.
6
1055
by: Just Me | last post by:
If I use one of my Usercontrols on a form the IDE does not admit to a constructor with arguments. I'm wondering if the 2005 version has improved on this. I have controls that have properties that absolutely must be set before other properties are set. Argument to NEW word be a nice way of doing it. Anyone familiar with 2005 version?
1
2004
by: Robert | last post by:
I have a large web site converted from 1.1 to 2.0 and in VS 2005, the IDE complains that in the ASPX file (html source): Error 1 Element 'stylesheet' is not a known element. This can occur if there is a compilation error in the Web site. C:\Documents and Settings\...\Local Settings\Temp\1\VWDWebCache\onlineformsdev.....com\sweepv2\dorequest1.aspx 16 7 http://onlineformsdev.....com/ The source code (start of the...
1
1092
by: Yuan | last post by:
It seems that VS 2005 doesn't allow inheritance for web usercontrols. I created two web UserControls, WebUserControl1 and WebUserControl2. I replaced base class of WebUserControl2 to be WebUserControl1 (public partial class WebUserControl2 : WebUserControl1). When compiled, got error: "The type or namespace name 'WebUserControl1' could not be found (are you missing a using directive or an assembly reference?)" In VS 2003, such...
3
2095
by: b747_440 | last post by:
Dear Newsgroup, I'm an old VB6.0 developper who switched some time ago to VB.NET 2005. I really like that new Visual Studio. However, something is going wrong now and I can't figure out, what it is... I was playing around with UserControls which are inherited from standard .NET controls to make myself some transparent controls. Suddenly I realized that after bulding my project those UserControls do not appear in the Toolbox anymore. I had...
2
1191
by: Nathan Sokalski | last post by:
Because I wanted the builds for my ASP.NET sites to be a single *.dll in a /bin/ directory (like VSNET 2003), I decided to try the Web Application Project download. However, I am still pulling my hair out because it doesn't want to recognize any of the Controls (not even the ones that are part of ASP.NET). All of the Controls show the following error: Name 'mycontrolid' is not declared. And my UserControls show the following error (all...
7
2496
by: Coleen | last post by:
Does anyone have any good detailed information on the conversion process? We are in the process of converting 2 projects from 2003 to 2005 and have some conversion errors that I can not find answers to. First, we have a lot of UserControls. I am getting the error "Type uc_mc_btn_footer is not defined." where uc_mc_btn_footer is the name of the UserControl. Also, on almost all of our UserControls the conversion has remmed out all my code...
4
1254
by: Nathan Sokalski | last post by:
In several of my UserControls I add properties. If I access these properties in the CodeBehind of the pages that use the controls, I recieve an error when compiling. The reason for this is because the compiler tries to compile the pages that use the UserControls before compiling the UserControls, and therefore does not know that the property exists when compiling. The only way around this that I have found is to use the CType() function as...
5
1448
by: billsahiker | last post by:
I saw one post here that basically said no way, but not sure which vs version was being discussed. Using vs 2005 I develped a user control in a vb project and would like to use that usercontrol in a web app, also developed with vs2005. I tried using @Reference and put the dll in the bin folder, and when that failed I created a Contols folder and put it there and still no luck. Intuitively it makes sense that this does not work, since vb...
7
2143
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows CType(Me.FindControl("admin" & CStr(section("buttontext")).Replace(" ", "")), adminsection2).RefreshSection() Next End Sub
0
8706
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
9199
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
9055
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
8947
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
8902
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
7787
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
5891
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
4642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3076
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

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.