By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,060 Members | 1,893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,060 IT Pros & Developers. It's quick & easy.

Passing data to another project

P: n/a
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
Share this Question
Share on Google+
10 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.