473,463 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can a vb 2005 usercontrol be used in asp 2005?

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
usercontrols can contain controls not natively supported by asp. Mine,
for example, has two listview controls.
Bill

May 16 '07 #1
5 1439
re:
Can a vb 2005 usercontrol be used in asp 2005?
First of all, there's no such thing as "asp 2005".

There's ASP.NET 2.0, which uses the .Net Framework 2.0,
which is the same .Net Framework targeted by VS 2005.

You should be able to easily use a user control in ASP.NET 2.0 and/or VS 2005.

Please review :
"How to: Create an ASP.NET User Control" :
http://msdn2.microsoft.com/en-us/library/26db8ysc.aspx

and

"How to: Include a User Control in an ASP.NET Web Page" :
http://msdn2.microsoft.com/en-us/library/sbz9etab.aspx

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
<bi*********@yahoo.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
>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
usercontrols can contain controls not natively supported by asp. Mine,
for example, has two listview controls.
Bill


May 16 '07 #2
If the userControl is properly written, you should be able to bring it into
an existing ASP.NET solution, grab it with the mouse from the Solution pane,
and drag it right onto a blank ASP.NET page that's in design view.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"bi*********@yahoo.com" wrote:
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
usercontrols can contain controls not natively supported by asp. Mine,
for example, has two listview controls.
Bill

May 16 '07 #3
To clarify, all my projects are in vs 2005. Please re-read my post
because you inferred that I am trying
to create a usercontrol in asp, which I am not. I stated that I
created a usercontrol in visual basic, and
want to re-use it in my asp project. I know I can use a visual basic
class library in an asp project, but I do not think a usercontrol
that is compiled with visual basic can be used in an asp project. If
it can I would like to know how to reference it
because I have tried the usual ways as explained in my post.

On May 16, 1:15 pm, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
Can a vb 2005 usercontrol be used in asp 2005?

First of all, there's no such thing as "asp 2005".

There's ASP.NET 2.0, which uses the .Net Framework 2.0,
which is the same .Net Framework targeted by VS 2005.

You should be able to easily use a user control in ASP.NET 2.0 and/or VS 2005.

Please review :
"How to: Create an ASP.NET User Control" :http://msdn2.microsoft.com/en-us/library/26db8ysc.aspx

and

"How to: Include a User Control in an ASP.NET Web Page" :http://msdn2.microsoft.com/en-us/library/sbz9etab.aspx

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================<billsahi... @yahoo.comwrote in message

news:11**********************@n59g2000hsh.googlegr oups.com...

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
usercontrols can contain controls not natively supported by asp. Mine,
for example, has two listview controls.
Bill- Hide quoted text -

- Show quoted text -

May 17 '07 #4
<bi*********@yahoo.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
you inferred that I am trying to create a usercontrol in asp, which
I am not.
That's effectively what you said: "vb" "visual basic" etc..

Are you actually talking about VB.NET...?
I stated that I created a usercontrol in visual basic
See above...

May 17 '07 #5
re:
!you inferred that I am trying to create a usercontrol in asp, which I am not

The first thing we need to have you clear up is
what you're referring to when you say "asp".

Did you mean "active server pages", or did you mean "asp.net" ?
Generally, when we refer to "asp", we mean "active server pages".

Is your question related to "asp" or to "asp.net" ?

Secondly, what did you mean when you said that you are using "asp 2005" ?
As I explained, there's no such animal.

There's "asp.net 2.0" and there's "vs 2005".

Asp.net is a mix of web server technologies and
vs 2005 is an Integrated Development Environment (IDE).

re:
!I created a usercontrol in visual basic

You did not.
"Visual Basic" is the name of a pre-vb.net language.

Vb.net is not "Visual Basic" any more, just as it isn't the language known as "basic" any more.
They're totally different programming languages.

re:
!I know I can use a visual basic class library in an asp project

Only if you compile it with VB 5.0 or 6.0 and use "active server pages".

You *can't* use a "visual basic class library" in asp.net,
except by going through contortions like Pinvoke.

re:
!I do not think a usercontrol that is compiled with visual basic can be used in an asp project

You, finally, said something which is undeniably correct.

User controls aren't usable in "active server pages".
I'm not sure, however, that you meant to refer to "active server pages".

I think you meant to refer "asp.net".
Did you ?

Summarizing, you need to make clearer whether you are
referring to "asp" ("active server pages") or to "asp.net".

....and you need to make clearer whether you are referring to "visual basic" or to "visual
basic.net".

The difference between them is critical and whether you get an answer
to your questions depends on us understanding what you are referring to.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
<bi*********@yahoo.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
To clarify, all my projects are in vs 2005. Please re-read my post
because you inferred that I am trying
to create a usercontrol in asp, which I am not. I stated that I
created a usercontrol in visual basic, and
want to re-use it in my asp project. I know I can use a visual basic
class library in an asp project, but I do not think a usercontrol
that is compiled with visual basic can be used in an asp project. If
it can I would like to know how to reference it
because I have tried the usual ways as explained in my post.

On May 16, 1:15 pm, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
Can a vb 2005 usercontrol be used in asp 2005?

First of all, there's no such thing as "asp 2005".

There's ASP.NET 2.0, which uses the .Net Framework 2.0,
which is the same .Net Framework targeted by VS 2005.

You should be able to easily use a user control in ASP.NET 2.0 and/or VS 2005.

Please review :
"How to: Create an ASP.NET User Control" :http://msdn2.microsoft.com/en-us/library/26db8ysc.aspx

and

"How to: Include a User Control in an ASP.NET Web Page"
:http://msdn2.microsoft.com/en-us/library/sbz9etab.aspx

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================<billsahi... @yahoo.comwrote in message

news:11**********************@n59g2000hsh.googlegr oups.com...

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
usercontrols can contain controls not natively supported by asp. Mine,
for example, has two listview controls.
Bill- Hide quoted text -

- Show quoted text -


May 17 '07 #6

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

Similar topics

8
by: Raed Sawalha | last post by:
Hi, I have a strange problem with a usercontrol on a page. The usercontrol dispalyes three categories (From a database) when the user clicks a category they see all the products in a shop for...
9
by: Richard Brown | last post by:
Can anyone give me a good argument one way or another? I have an 'address' set of fields that are used in various situations (a client has an address, a destination has an address, etc). These...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
1
by: João Santa Bárbara | last post by:
Hi all. i have a strange problem i have done a User Control, in wich i have placed a few buttons inside it and place it in an form. in the previous version of .NET (2003), i have try to access...
5
by: Pieter | last post by:
Hi, I'm getting a really terrible and anoying bug/problem in VS.NET 2005: 1. Create a new Windows Application. 2. Add a new class Class1. 3. Add a usercontrol UserControl1. 4. Add a public...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
4
by: Michael | last post by:
Hi Everyone, I hope someone else has had this problem. I recently started to use VS 2005 (vb.net) and today alone I have had to close VS 8 times while trying to code. I have a least 130 controls...
0
by: Sugan | last post by:
Hi, I'm converting a VB 6.0 project to VB 2005. There are few issues, where i got stuck up. They are 1. 'Ambient' is not a member of 'System.Windows.Forms.UserControl' This is the code...
7
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
1
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
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...
0
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.