473,498 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing data to another project

Vik
From a Web page, I need to open another page created in another project and
pass some object (a database connetion) to that page. Looks like the second
project has its own Application and Session states.

Thanks.
Apr 26 '06 #1
10 1428
I am curious as to why you would want to do that?

"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.

Apr 26 '06 #2
You should never persist a connection, much less "pass" one

Jeff
"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.

Apr 26 '06 #3
Vik,
Seems a bit strange, but you could certainly pass a connection string on the
querystring to the other app and have its respective page read it back out,
then open the same connection using the connection string.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Vik" wrote:
From a Web page, I need to open another page created in another project and
pass some object (a database connetion) to that page. Looks like the second
project has its own Application and Session states.

Thanks.

Apr 26 '06 #4
I do not recommend passing a precious database connection to another
application even if its possible, which I kind of doubt.
You could pass a connection string via post or querystring, but if the
connection string has a password in it then that would be a big security
no-no.
It would be better to pass a connection string server side if possible,
perhaps through a shared file or database.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.

Apr 26 '06 #5
That is why the connectionstrings are in the web.config really -- I am still
not sure why there is a need for "sharing" of db connection

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.

Apr 27 '06 #6
Vik
I developed a Web page, which allows performing some standard operations on
the different tables (with the identical structure). I want to call this
page from the different Web applications connected to the different
databases.
Now I have a copy of that common page in every application but I try to make
a separate project for this page and share it among the applications.
I don't want to pass the connection string in the querystring. I may also
need to pass other objects (not strings).

Vik
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:uz**************@TK2MSFTNGP03.phx.gbl...
That is why the connectionstrings are in the web.config really -- I am
still not sure why there is a need for "sharing" of db connection

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.


Apr 27 '06 #7
Looks like you need a "class library" not a page -- the class library can
have your common code and it can referenced to any web project you like.

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I developed a Web page, which allows performing some standard operations on
the different tables (with the identical structure). I want to call this
page from the different Web applications connected to the different
databases.
Now I have a copy of that common page in every application but I try to
make a separate project for this page and share it among the applications.
I don't want to pass the connection string in the querystring. I may also
need to pass other objects (not strings).

Vik
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:uz**************@TK2MSFTNGP03.phx.gbl...
That is why the connectionstrings are in the web.config really -- I am
still not sure why there is a need for "sharing" of db connection

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.



Apr 27 '06 #8
Vik
I use class libraries. But in this case I need not only the code but the
common page with UI .

Vik

"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:e6**************@TK2MSFTNGP05.phx.gbl...
Looks like you need a "class library" not a page -- the class library can
have your common code and it can referenced to any web project you like.

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I developed a Web page, which allows performing some standard operations
on the different tables (with the identical structure). I want to call
this page from the different Web applications connected to the different
databases.
Now I have a copy of that common page in every application but I try to
make a separate project for this page and share it among the
applications.
I don't want to pass the connection string in the querystring. I may also
need to pass other objects (not strings).

Vik
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:uz**************@TK2MSFTNGP03.phx.gbl...
That is why the connectionstrings are in the web.config really -- I am
still not sure why there is a need for "sharing" of db connection

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like
the second project has its own Application and Session states.

Thanks.



Apr 27 '06 #9
Good point! Which prompted me to write up this article and sample code for
obfuscating the querystring:

http://www.eggheadcafe.com/articles/20060427.asp

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Steve C. Orr [MVP, MCSD]" wrote:
I do not recommend passing a precious database connection to another
application even if its possible, which I kind of doubt.
You could pass a connection string via post or querystring, but if the
connection string has a password in it then that would be a big security
no-no.
It would be better to pass a connection string server side if possible,
perhaps through a shared file or database.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
From a Web page, I need to open another page created in another project
and pass some object (a database connetion) to that page. Looks like the
second project has its own Application and Session states.

Thanks.


Apr 27 '06 #10
You will need to include this page in your project

"Vik" <viktorum@==yahoo.com==> wrote in message
news:uz**************@TK2MSFTNGP02.phx.gbl...
I use class libraries. But in this case I need not only the code but the
common page with UI .

Vik

"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:e6**************@TK2MSFTNGP05.phx.gbl...
Looks like you need a "class library" not a page -- the class library can
have your common code and it can referenced to any web project you like.

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I developed a Web page, which allows performing some standard operations
on the different tables (with the identical structure). I want to call
this page from the different Web applications connected to the different
databases.
Now I have a copy of that common page in every application but I try to
make a separate project for this page and share it among the
applications.
I don't want to pass the connection string in the querystring. I may
also need to pass other objects (not strings).

Vik
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:uz**************@TK2MSFTNGP03.phx.gbl...
That is why the connectionstrings are in the web.config really -- I am
still not sure why there is a need for "sharing" of db connection

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Vik" <viktorum@==yahoo.com==> wrote in message
news:uG***************@TK2MSFTNGP02.phx.gbl...
> From a Web page, I need to open another page created in another
> project and pass some object (a database connetion) to that page.
> Looks like the second project has its own Application and Session
> states.
>
> Thanks.
>
>



Apr 27 '06 #11

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

Similar topics

2
2506
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text,...
58
10042
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
5
5269
by: nifsmith | last post by:
Hi I am trying to learn about Queues and use templates at the same time. I have written the following code and I am getting a link error, stating "unresolved external symbol, "int__cdecl...
4
4860
by: Ron Rohrssen | last post by:
I want to show a dialog and when the form (dialog) is closed, return to the calling form. The calling form should then be able to pass the child form to another object with the form as a...
25
5023
by: Stuart Hilditch | last post by:
Hi all, I am hoping that someone with some experience developing nTier apps can give me some advice here. I am writing an nTier web app that began with a Data Access Layer (DAL), Business...
7
2615
by: Jake Thompson | last post by:
Hello I created a DLL that has a function that is called from my main c program. In my exe I first get a a pointer to the address of the function by using GetProcAddress and on the dll side I...
7
3288
by: TS | last post by:
I was under the assumption that if you pass an object as a param to a method and inside that method this object is changed, the object will stay changed when returned from the method because the...
3
2383
by: DaTurk | last post by:
If I call this method, and pass it a byte by ref, and initialize another byte array, set the original equal to it, and then null the reference, why is the original byte array not null as well? I...
1
6294
by: Dean Slindee | last post by:
VS2008, .NetFramework 3.5 SP1: I have built a LINQ data access layer project. When the LINQ data context was built over an existing SQL2005 database, the connection string for that database was...
0
6993
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...
0
7162
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,...
0
7197
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...
0
7375
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
5456
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,...
1
4899
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1411
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 ...
0
287
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...

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.