473,766 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using C# in a VB.Net project

I am using a 3rd party ecommerce application writen in VB.NET. I have
developed a couple c# addons that I would like to integrate into the
ecommerce site, more specifically I need to share session information across
the pages.

Can it be done?

Thanks, Justin.
Nov 18 '05 #1
3 1340
If you can have a aspx pages with vb.net code behind and aspx pages with c#
code behind within the same web application it is possible to share the
session. As it is the application context that holds the session
information. You need to try that.

But if you cannot have aspx vb.net and aspx c# run in the same web
applicationd then you won't be able to share the session in an other way
that doing it manually (request strings, DB, cookies maybe?).
But also check out also the option to run the storage of the Session
information out of process.
http://msdn.microsoft.com/library/de...sp12282000.asp
But I think that it may not help as if the pages run from different
applications they should not share the Session anyway. But as i never tried
the out process model, I am not sure. I am just trying to give you a few
hints for you to have a look at.

Best regards,

Francois

"Justin" <Ju****@discuss ions.microsoft. com> wrote in message
news:E4******** *************** ***********@mic rosoft.com...
I am using a 3rd party ecommerce application writen in VB.NET. I have
developed a couple c# addons that I would like to integrate into the
ecommerce site, more specifically I need to share session information across the pages.

Can it be done?

Thanks, Justin.

Nov 18 '05 #2
Once compiled, a C# DLL is no different than a VB.Net DLL. As for
integrating your add-ons with a 3rd party application, I suppose that
depends on the add-ons and the 3rd party application. I can use the same
metal to build a car or a toaster. But try finding a plug in a car that you
can plug your toaster into!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Justin" <Ju****@discuss ions.microsoft. com> wrote in message
news:E4******** *************** ***********@mic rosoft.com...
I am using a 3rd party ecommerce application writen in VB.NET. I have
developed a couple c# addons that I would like to integrate into the
ecommerce site, more specifically I need to share session information across the pages.

Can it be done?

Thanks, Justin.

Nov 18 '05 #3
you'd need to put your C# code in a seperate project/assembly since you
can't have Both in the same project.

Now the problem is...the ASP.NET project is VB and the other project is a C#
Class Library. How do you get to all the good HTTP Stuff with C#?

In your C# project, make sure there's a reference to the System.Web
Namespace.
To get the HTTP stuff, try
System.Web.Http Context ctx = System.Web.Http Context.Current ;

from there, you can get the ctx.Session, ctx.Response, ctx.Request
(of if you want to be REALLY cool...)
System.Web.Ui.P age thePage = (System.Web.Ui. Page)ctx.Handle r;

If you want to cast the handler into your specific type of page, you're
going to have to have more than 2 projects...othe rwise you'd end up with a
circular reference.

"Justin" <Ju****@discuss ions.microsoft. com> wrote in message
news:E4******** *************** ***********@mic rosoft.com...
I am using a 3rd party ecommerce application writen in VB.NET. I have
developed a couple c# addons that I would like to integrate into the
ecommerce site, more specifically I need to share session information across the pages.

Can it be done?

Thanks, Justin.

Nov 18 '05 #4

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

Similar topics

1
2536
by: Jimmy Tran | last post by:
Hi Folks, I have a web database written in asp and using access97. I have many projects, but each project is being held responsible by a person. All people and projects come from the database. Looks like this: Responsible Person Project Name Canter, Joe Project A Williams, Bob Project B
121
10150
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
5
1665
by: Derek Martin | last post by:
I am creating a windows service and have added a reference to a DLL project that I have created. That DLL file is correctly referenced in both a windows app and a web app, all in the same solution, so I thought I could do the same for a service project. However, after successfully adding the reference and making sure the namespaces were correct, I cannot see any of my public methods and functions from the DLL file. Is there anything...
2
2227
by: Bill Nguyen | last post by:
I would like to add a new VB.NET project using the same folder being used by another project so that I can share several forms already creaded by the other project. However, .NET created a new folder using whatever project name I supplied. Is there a work around for this? Thanks Bill
1
1448
by: Diffident | last post by:
Hello All, I have a question as to why my users are noticing error when I am building the project on the production system. Here is the problem's background. In order to build the project on the production system, I use the Visual Studio's File > Open From Web and then build the solution. Some of the build settings are as follows: Output path: bin
8
2172
by: Bruce | last post by:
I am using VB in Vs2005. Am I missing something or does VB not have the concept of "builds" (release/debug) like in VC? I wrote an assembly and I would like to have a debug version of the DLL and a release version of the DLL. I would like to create some sample code that demonstrates my assembly in VB and would like to have two builds, one using my debug version and the other using the release version of the assembly. How can I do...
12
7595
by: BDowling | last post by:
Hi all, I have an existing Visual C++ project that builds a DLL (not COM or ATL or anything). I wish to use this DLL in a Visual Studio 2005 C# project without having to define each function and structure again in the C# project (using pinvoke I believe). I've done some reading around and it seems that what I'm after is possible. I've added the old C++ project to my new C# solution and set the compiler to use /clr. I can then add the...
6
17027
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project as "Additional Dependencies" under Linker-Input options. Since those libraries are also in different directory, I specified that library path in project as "Additional Library Directories" under Linker-General options. This is where I see some...
6
5254
by: Daniel Kraft | last post by:
Hi all, in my C++ projects, I usually make "heavy use" of namespaces to "encapsulate" my code. When I have for instance something like this: namespace project { namespace part1 { ... } namespace part2 { ... } }
3
13668
by: Jeff | last post by:
I have a solution with two projects. Project A is the startup project, while Project B serves as the project with the data logic. At run time, the first thing I need to do is write to Project B's app.config. I've referenced System.configuration.dll within Project B, and from one of the classes inside Project B's namespace, I'm trying to use ConfigurationManager to write to its app.config. Unfortunately, it only finds Project A's...
0
9568
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
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10008
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...
0
8833
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
7381
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
6651
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
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
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
3
2806
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.